Skip to content

Commit 78c516d

Browse files
committed
Remove redundant reference operands
1 parent c2afb8b commit 78c516d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/dynamic_set.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl Set {
5656
let mut ptr: Option<&mut Box<Entry>> = self.buckets[bucket_index].as_mut();
5757

5858
while let Some(entry) = ptr.take() {
59-
if entry.hash == hash && &*entry.string == &*string {
59+
if entry.hash == hash && *entry.string == *string {
6060
if entry.ref_count.fetch_add(1, SeqCst) > 0 {
6161
return NonNull::from(&mut **entry);
6262
}

src/trivial_impls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl<Static: StaticAtomSet> PartialEq<Atom<Static>> for str {
3939

4040
impl<Static: StaticAtomSet> PartialEq<String> for Atom<Static> {
4141
fn eq(&self, other: &String) -> bool {
42-
&self[..] == &other[..]
42+
self[..] == other[..]
4343
}
4444
}
4545

@@ -66,7 +66,7 @@ impl<Static: StaticAtomSet> fmt::Display for Atom<Static> {
6666

6767
impl<Static: StaticAtomSet> AsRef<str> for Atom<Static> {
6868
fn as_ref(&self) -> &str {
69-
&self
69+
self
7070
}
7171
}
7272

0 commit comments

Comments
 (0)