Merge pull request #20757 from Shourya742/force-fileid-invariant-to-interner
Use FileId::MAX for id assertion in PathInterner::intern
This commit is contained in:
commit
082ecd8f73
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue