internal: Don't eagerly try to read crate root file contents before VFS

This commit is contained in:
Lukas Wirth 2024-03-19 16:12:56 +01:00
parent 399dbc074b
commit 7b91d01360
3 changed files with 17 additions and 20 deletions

View file

@ -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,