mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
remove unnecessary lazy evaluations
This commit is contained in:
parent
7530d76f00
commit
cc80c5bd07
31 changed files with 50 additions and 51 deletions
|
@ -273,7 +273,7 @@ impl DocCommentToken {
|
|||
let (in_expansion_range, link, ns) =
|
||||
extract_definitions_from_docs(&docs).into_iter().find_map(|(range, link, ns)| {
|
||||
let mapped = doc_mapping.map(range)?;
|
||||
(mapped.value.contains(abs_in_expansion_offset)).then(|| (mapped.value, link, ns))
|
||||
(mapped.value.contains(abs_in_expansion_offset)).then_some((mapped.value, link, ns))
|
||||
})?;
|
||||
// get the relative range to the doc/attribute in the expansion
|
||||
let in_expansion_relative_range = in_expansion_range - descended_prefix_len - token_start;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue