mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
fix tests
This commit is contained in:
parent
062019590d
commit
7503c5528f
4 changed files with 21 additions and 12 deletions
|
@ -3,6 +3,7 @@ use std::{
|
|||
Arc,
|
||||
atomic::{AtomicBool, Ordering::SeqCst},
|
||||
},
|
||||
hash::{Hash, Hasher},
|
||||
fmt,
|
||||
collections::VecDeque,
|
||||
iter,
|
||||
|
@ -29,6 +30,21 @@ pub(crate) struct FileResolverImp {
|
|||
inner: Arc<FileResolver>
|
||||
}
|
||||
|
||||
impl PartialEq for FileResolverImp {
|
||||
fn eq(&self, other: &FileResolverImp) -> bool {
|
||||
self.inner() == other.inner()
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for FileResolverImp {
|
||||
}
|
||||
|
||||
impl Hash for FileResolverImp {
|
||||
fn hash<H: Hasher>(&self, hasher: &mut H) {
|
||||
self.inner().hash(hasher);
|
||||
}
|
||||
}
|
||||
|
||||
impl FileResolverImp {
|
||||
pub(crate) fn new(inner: Arc<FileResolver>) -> FileResolverImp {
|
||||
FileResolverImp { inner }
|
||||
|
@ -39,6 +55,9 @@ impl FileResolverImp {
|
|||
pub(crate) fn resolve(&self, file_id: FileId, path: &RelativePath) -> Option<FileId> {
|
||||
self.inner.resolve(file_id, path)
|
||||
}
|
||||
fn inner(&self) -> *const FileResolver {
|
||||
&*self.inner
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for FileResolverImp {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue