From 82332c33e7d37860ece13dcde0e27dfeb99869b4 Mon Sep 17 00:00:00 2001 From: bit-aloo Date: Sat, 27 Sep 2025 12:03:04 +0530 Subject: [PATCH] Use FileId::MAX for id assertion in PathInterner::intern --- crates/vfs/src/path_interner.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/vfs/src/path_interner.rs b/crates/vfs/src/path_interner.rs index 64f51976053d..225bfc7218b4 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) }