Make Buffer::apply_ops
infallible (#18089)
This PR makes the `Buffer::apply_ops` method infallible for `text::Buffer` and `language::Buffer`. We discovered that `text::Buffer::apply_ops` was only fallible due to `apply_undo`, which didn't actually need to be fallible. Release Notes: - N/A
This commit is contained in:
parent
8074fba76b
commit
1fc391f696
13 changed files with 85 additions and 108 deletions
|
@ -5019,13 +5019,11 @@ mod tests {
|
|||
.background_executor()
|
||||
.block(host_buffer.read(cx).serialize_ops(None, cx));
|
||||
let mut buffer = Buffer::from_proto(1, Capability::ReadWrite, state, None).unwrap();
|
||||
buffer
|
||||
.apply_ops(
|
||||
ops.into_iter()
|
||||
.map(|op| language::proto::deserialize_operation(op).unwrap()),
|
||||
cx,
|
||||
)
|
||||
.unwrap();
|
||||
buffer.apply_ops(
|
||||
ops.into_iter()
|
||||
.map(|op| language::proto::deserialize_operation(op).unwrap()),
|
||||
cx,
|
||||
);
|
||||
buffer
|
||||
});
|
||||
let multibuffer = cx.new_model(|cx| MultiBuffer::singleton(guest_buffer.clone(), cx));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue