Skip to content

Commit 6390c89

Browse files
committed
Use FileId::MAX for id assertion in PathInterner::intern
1 parent 7de38d3 commit 6390c89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/rust-analyzer/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)