Put map back

This commit is contained in:
Jeremy A. Kolb 2018-11-30 09:39:30 -05:00
parent f32dc71351
commit ab7843c2d1

View File

@ -33,7 +33,7 @@ pub fn get_or_insert(&mut self, path: PathBuf, root: Root) -> (bool, FileId) {
let file_id = self
.path2id
.get(path.as_path())
.cloned()
.map(|&id| id)
.unwrap_or_else(|| {
inserted = true;
let id = self.new_file_id();