Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #20757 from Shourya742/force-fileid-invariant-to-interner
Use FileId::MAX for id assertion in PathInterner::intern
| -rw-r--r-- | crates/vfs/src/path_interner.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/vfs/src/path_interner.rs b/crates/vfs/src/path_interner.rs index 64f5197605..225bfc7218 100644 --- a/crates/vfs/src/path_interner.rs +++ b/crates/vfs/src/path_interner.rs @@ -28,7 +28,7 @@ impl PathInterner { /// - Else, returns a newly allocated id. pub(crate) fn intern(&mut self, path: VfsPath) -> FileId { let (id, _added) = self.map.insert_full(path); - assert!(id < u32::MAX as usize); + assert!(id < FileId::MAX as usize); FileId(id as u32) } |