From da7ce6f8102a2502cc4ada73e2bab72b6dfbf8d4 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Fri, 30 Dec 2022 11:14:15 +0000 Subject: [PATCH] derive 'Hash' --- crates/vfs/src/lib.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/vfs/src/lib.rs b/crates/vfs/src/lib.rs index afc9a0fa6fb..c61f30387b7 100644 --- a/crates/vfs/src/lib.rs +++ b/crates/vfs/src/lib.rs @@ -59,15 +59,10 @@ pub use paths::{AbsPath, AbsPathBuf}; /// Handle to a file in [`Vfs`] /// /// Most functions in rust-analyzer use this when they need to refer to a file. -#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq)] +#[derive(Copy, Clone, Debug, Ord, PartialOrd, Eq, PartialEq, Hash)] pub struct FileId(pub u32); impl stdx::hash::NoHashHashable for FileId {} -impl std::hash::Hash for FileId { - fn hash(&self, state: &mut H) { - self.0.hash(state); - } -} /// Storage for all files read by rust-analyzer. ///