Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/vfs/src/lib.rs')
| -rw-r--r-- | crates/vfs/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/vfs/src/lib.rs b/crates/vfs/src/lib.rs index 824ce39870..9d723f8143 100644 --- a/crates/vfs/src/lib.rs +++ b/crates/vfs/src/lib.rs @@ -121,6 +121,11 @@ impl ChangedFile { matches!(self.change, Change::Create(_) | Change::Delete) } + /// Returns `true` if the change is [`Modify`](ChangeKind::Modify). + pub fn is_modified(&self) -> bool { + matches!(self.change, Change::Modify(_)) + } + pub fn kind(&self) -> ChangeKind { match self.change { Change::Create(_) => ChangeKind::Create, |