MCPcopy Create free account
hub / github.com/SharpCoder/teensycore / eq

Method eq

src/system/strings.rs:107–122  ·  view source on GitHub ↗
(&self, other: &Self)

Source from the content-addressed store, hash-verified

105
106impl PartialEq for String {
107 fn eq(&self, other: &Self) -> bool {
108 if self.size() != other.size() {
109 return false;
110 }
111
112 for idx in 0 .. self.size() {
113 let left = self.get(idx).unwrap();
114 let right = other.get(idx).unwrap();
115
116 if left != right {
117 return false;
118 }
119 }
120
121 return true;
122 }
123}
124
125// This might be a bad idea... but it makes BTreeMap super useful

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected