]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_data_structures/ptr_key.rs
Rollup merge of #68233 - danielframpton:update-compiler-builtins, r=alexcrichton
[rust.git] / src / librustc_data_structures / ptr_key.rs
index bf3ae2d7af58f77fae0d27e4ad8789856e727429..440ccb05d86e4a577d5b0619b089ac487fe6a753 100644 (file)
@@ -1,5 +1,5 @@
-use std::{hash, ptr};
 use std::ops::Deref;
+use std::{hash, ptr};
 
 /// A wrapper around reference that compares and hashes like a pointer.
 /// Can be used as a key in sets/maps indexed by pointers to avoid `unsafe`.
@@ -7,7 +7,9 @@
 pub struct PtrKey<'a, T>(pub &'a T);
 
 impl<'a, T> Clone for PtrKey<'a, T> {
-    fn clone(&self) -> Self { *self }
+    fn clone(&self) -> Self {
+        *self
+    }
 }
 
 impl<'a, T> Copy for PtrKey<'a, T> {}