Skip to content

Commit 52fdaf5

Browse files
committed
remove unnecessary change for positions inside find_all_references
1 parent c44c5c9 commit 52fdaf5

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/utils.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,10 @@ pub fn find_all_references<'a>(
196196
.collect::<Vec<_>>()
197197
})
198198
.map(|span| {
199-
let (start, mut end) = span_to_positions(&span)?;
200-
end.character = start.character + u32::try_from(func_name.as_inner().len())?;
199+
let (start, end) = span_to_positions(&span)?;
201200
Ok(lsp_types::Range { start, end })
202201
})
203-
.collect::<Result<Vec<_>, LspError>>() // collects results, propagating first Err
202+
.collect::<Result<Vec<_>, LspError>>()
204203
}
205204

206205
#[cfg(test)]

0 commit comments

Comments
 (0)