diff options
Diffstat (limited to 'src/libstd/str.rs')
| -rw-r--r-- | src/libstd/str.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 4516fb85f90..0d4c820e637 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -4042,7 +4042,8 @@ mod bench { struct NotAscii(char); impl CharEq for NotAscii { fn matches(&self, c: char) -> bool { - **self == c + let NotAscii(cc) = *self; + cc == c } fn only_ascii(&self) -> bool { false } } @@ -4065,7 +4066,10 @@ mod bench { struct NotAscii(char); impl CharEq for NotAscii { #[inline] - fn matches(&self, c: char) -> bool { **self == c } + fn matches(&self, c: char) -> bool { + let NotAscii(cc) = *self; + cc == c + } fn only_ascii(&self) -> bool { false } } let s = "Mary had a little lamb, Little lamb, little-lamb."; |
