Assert that buffers' file state matches in randomized collab test

Co-authored-by: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-12-21 15:38:44 -08:00
parent 89da738fae
commit c321f5d94a
7 changed files with 31 additions and 12 deletions

View file

@ -514,8 +514,8 @@ impl Buffer {
self.text.snapshot()
}
pub fn file(&self) -> Option<&dyn File> {
self.file.as_deref()
pub fn file(&self) -> Option<&Arc<dyn File>> {
self.file.as_ref()
}
pub fn save(
@ -2373,8 +2373,8 @@ impl BufferSnapshot {
self.selections_update_count
}
pub fn file(&self) -> Option<&dyn File> {
self.file.as_deref()
pub fn file(&self) -> Option<&Arc<dyn File>> {
self.file.as_ref()
}
pub fn resolve_file_path(&self, cx: &AppContext, include_root: bool) -> Option<PathBuf> {