(&mut self, path: PathBuf, content: String)
| 485 | } |
| 486 | |
| 487 | pub fn insert(&mut self, path: PathBuf, content: String) { |
| 488 | let last_id = self.source_ids.keys().max().cloned().unwrap_or(0); |
| 489 | self.sources.insert(path.clone(), content); |
| 490 | self.source_ids.insert(last_id + 1, path); |
| 491 | } |
| 492 | |
| 493 | pub fn get_path(&self, source_id: u16) -> Option<&PathBuf> { |
| 494 | self.source_ids.get(&source_id) |