Change summary
crates/project/src/project.rs | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
Detailed changes
@@ -7747,10 +7747,13 @@ impl Project {
}
let buffer_id = BufferId::new(state.id)?;
- let buffer = cx.new_model(|_| {
- Buffer::from_proto(this.replica_id(), this.capability(), state, buffer_file)
- .unwrap()
- });
+ let buffer = Buffer::from_proto(
+ this.replica_id(),
+ this.capability(),
+ state,
+ buffer_file,
+ )?;
+ let buffer = cx.new_model(|_| buffer);
this.incomplete_remote_buffers
.insert(buffer_id, Some(buffer));
}