Move protobuf logic from buffer crate to language crate
This will enable us to add operations that only pertain to the language crate. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
78d97a3db2
commit
40c861c249
7 changed files with 322 additions and 338 deletions
|
@ -430,8 +430,8 @@ impl Worktree {
|
|||
let ops = payload
|
||||
.operations
|
||||
.into_iter()
|
||||
.map(|op| op.try_into())
|
||||
.collect::<anyhow::Result<Vec<_>>>()?;
|
||||
.map(|op| language::proto::deserialize_operation(op))
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
match self {
|
||||
Worktree::Local(worktree) => {
|
||||
|
@ -1944,7 +1944,7 @@ impl language::File for File {
|
|||
.request(proto::UpdateBuffer {
|
||||
worktree_id: remote_id,
|
||||
buffer_id,
|
||||
operations: vec![(&operation).into()],
|
||||
operations: vec![language::proto::serialize_operation(&operation)],
|
||||
})
|
||||
.await
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue