Reduce accessibility of multibuffer read to reduce risk of borrowing snapshot and buffer refcells twice

This commit is contained in:
Keith Simmons 2022-05-13 16:58:30 -07:00
parent 2f7eb6dbc5
commit a2fd41174f
9 changed files with 36 additions and 17 deletions

View file

@ -489,11 +489,11 @@ impl workspace::Item for ProjectDiagnosticsEditor {
}
fn is_dirty(&self, cx: &AppContext) -> bool {
self.excerpts.read(cx).read(cx).is_dirty()
self.excerpts.read(cx).is_dirty(cx)
}
fn has_conflict(&self, cx: &AppContext) -> bool {
self.excerpts.read(cx).read(cx).has_conflict()
self.excerpts.read(cx).has_conflict(cx)
}
fn can_save(&self, _: &AppContext) -> bool {