mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
fix clippy::redundant_closure
This commit is contained in:
parent
1f70886b15
commit
451fcd3c79
11 changed files with 17 additions and 25 deletions
|
@ -88,9 +88,8 @@ fn parse_adt(tt: &tt::Subtree) -> Result<BasicAdtInfo, ExpandError> {
|
|||
debug!("parsed item has no name");
|
||||
ExpandError::Other("missing name".into())
|
||||
})?;
|
||||
let name_token_id = token_map
|
||||
.token_by_range(name.syntax().text_range())
|
||||
.unwrap_or_else(|| TokenId::unspecified());
|
||||
let name_token_id =
|
||||
token_map.token_by_range(name.syntax().text_range()).unwrap_or_else(TokenId::unspecified);
|
||||
let name_token = tt::Ident { id: name_token_id, text: name.text().into() };
|
||||
let type_or_const_params =
|
||||
params.map_or(0, |type_param_list| type_param_list.type_or_const_params().count());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue