Skip to content

Commit 0138b82

Browse files
authored
Merge pull request #20757 from Shourya742/force-fileid-invariant-to-interner
Use FileId::MAX for id assertion in PathInterner::intern
2 parents fcfff08 + 82332c3 commit 0138b82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/vfs/src/path_interner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl PathInterner {
2828
/// - Else, returns a newly allocated id.
2929
pub(crate) fn intern(&mut self, path: VfsPath) -> FileId {
3030
let (id, _added) = self.map.insert_full(path);
31-
assert!(id < u32::MAX as usize);
31+
assert!(id < FileId::MAX as usize);
3232
FileId(id as u32)
3333
}
3434

0 commit comments

Comments
 (0)