mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
internal: Refine CrateOrigin variants
This commit is contained in:
parent
42d671fcb7
commit
31db1fc75f
12 changed files with 343 additions and 235 deletions
|
@ -160,7 +160,7 @@ impl Vfs {
|
|||
/// [`FileId`] for it.
|
||||
pub fn set_file_contents(&mut self, path: VfsPath, contents: Option<Vec<u8>>) -> bool {
|
||||
let file_id = self.alloc_file_id(path);
|
||||
let change_kind = match (&self.get(file_id), &contents) {
|
||||
let change_kind = match (self.get(file_id), &contents) {
|
||||
(None, None) => return false,
|
||||
(Some(old), Some(new)) if old == new => return false,
|
||||
(None, Some(_)) => ChangeKind::Create,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue