Less panic, more tests

This commit is contained in:
Kirill Bulatov
2020-12-04 21:23:30 +02:00
parent 045d7f096f
commit 077c1c3c1f
3 changed files with 62 additions and 11 deletions

View File

@@ -1626,12 +1626,12 @@ fn fill_resolve_data(
let imported_name = import_edit.import_path.segments.clone().pop()?.to_string();
*resolve_data = Some(
serde_json::to_value(CompletionResolveData {
to_value(CompletionResolveData {
position: position.to_owned(),
full_import_path,
imported_name,
})
.expect("Failed to serialize a regular struct with derives"),
.unwrap(),
)
}
Some(())