Update test data

This commit is contained in:
Aleksey Kladov 2020-05-19 20:27:14 +02:00
parent 3dd68c1ba3
commit 3e9bf7ebab
2 changed files with 16 additions and 38 deletions

View File

@ -206,7 +206,9 @@ pub struct CodeAction {
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct SnippetWorkspaceEdit {
#[serde(skip_serializing_if = "Option::is_none")]
pub changes: Option<HashMap<lsp_types::Url, Vec<lsp_types::TextEdit>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub document_changes: Option<Vec<SnippetDocumentChangeOperation>>,
}

View File

@ -333,29 +333,17 @@ fn main() {}
partial_result_params: PartialResultParams::default(),
work_done_progress_params: WorkDoneProgressParams::default(),
},
json!([
{
"command": {
"arguments": [
json!([{
"edit": {
"documentChanges": [
{
"cursorPosition": null,
"label": "Create module",
"workspaceEdit": {
"documentChanges": [
{
"kind": "create",
"uri": "file:///[..]/src/bar.rs"
}
]
}
"kind": "create",
"uri": "file:///[..]/src/bar.rs"
}
],
"command": "rust-analyzer.applySourceChange",
"title": "Create module"
]
},
"title": "Create module"
}
]),
}]),
);
server.request::<CodeActionRequest>(
@ -416,29 +404,17 @@ fn main() {{}}
partial_result_params: PartialResultParams::default(),
work_done_progress_params: WorkDoneProgressParams::default(),
},
json!([
{
"command": {
"arguments": [
json!([{
"edit": {
"documentChanges": [
{
"cursorPosition": null,
"label": "Create module",
"workspaceEdit": {
"documentChanges": [
{
"kind": "create",
"uri": "file:///[..]/src/bar.rs"
}
]
}
"kind": "create",
"uri": "file://[..]/src/bar.rs"
}
],
"command": "rust-analyzer.applySourceChange",
"title": "Create module"
]
},
"title": "Create module"
}
]),
}]),
);
server.request::<CodeActionRequest>(