WIP: Load remote history

This commit is contained in:
Antonio Scandurra
2021-06-21 12:15:58 +02:00
parent f4d6fbe14f
commit 2905ce3ba7
5 changed files with 35 additions and 60 deletions
+2 -12
View File
@@ -408,26 +408,16 @@ mod tests {
let response2 = proto::AuthResponse {
credentials_valid: false,
};
let request3 = proto::OpenBuffer {
worktree_id: 102,
path: "path/two".to_string(),
};
let request3 = proto::OpenBuffer { id: 2 };
let response3 = proto::OpenBufferResponse {
buffer: Some(proto::Buffer {
id: 1001,
path: "path/two".to_string(),
content: "path/two content".to_string(),
history: vec![],
}),
};
let request4 = proto::OpenBuffer {
worktree_id: 101,
path: "path/one".to_string(),
};
let request4 = proto::OpenBuffer { id: 1 };
let response4 = proto::OpenBufferResponse {
buffer: Some(proto::Buffer {
id: 1002,
path: "path/one".to_string(),
content: "path/one content".to_string(),
history: vec![],
}),
+1 -5
View File
@@ -145,11 +145,7 @@ mod tests {
}
.into_envelope(3, None, None);
let message2 = OpenBuffer {
worktree_id: 1,
path: "path".to_string(),
}
.into_envelope(5, None, None);
let message2 = OpenBuffer { id: 1 }.into_envelope(5, None, None);
let mut message_stream = MessageStream::new(byte_stream);
message_stream.write_message(&message1).await.unwrap();