Use TryConv for conversion
This commit is contained in:
@@ -678,11 +678,10 @@ pub fn handle_document_highlight(
|
|||||||
) -> Result<Option<Vec<DocumentHighlight>>> {
|
) -> Result<Option<Vec<DocumentHighlight>>> {
|
||||||
let file_id = params.text_document.try_conv_with(&world)?;
|
let file_id = params.text_document.try_conv_with(&world)?;
|
||||||
let line_index = world.analysis().file_line_index(file_id);
|
let line_index = world.analysis().file_line_index(file_id);
|
||||||
let offset = params.position.conv_with(&line_index);
|
|
||||||
|
|
||||||
let refs = world
|
let refs = world
|
||||||
.analysis()
|
.analysis()
|
||||||
.find_all_refs(FilePosition { file_id, offset })?;
|
.find_all_refs(params.try_conv_with(&world)?)?;
|
||||||
|
|
||||||
Ok(Some(
|
Ok(Some(
|
||||||
refs.into_iter()
|
refs.into_iter()
|
||||||
|
|||||||
Reference in New Issue
Block a user