cargo clippy --fix

This commit is contained in:
Johann Hemmann 2024-01-18 13:59:49 +01:00
parent 1ab8c7fd27
commit fad4fa163c
178 changed files with 595 additions and 738 deletions

View file

@ -104,7 +104,7 @@ impl Definition {
/// renamed and extern crate names will report its range, though a rename will introduce
/// an alias instead.
pub fn range_for_rename(self, sema: &Semantics<'_, RootDatabase>) -> Option<FileRange> {
let syn_ctx_is_root = |(range, ctx): (_, SyntaxContextId)| ctx.is_root().then(|| range);
let syn_ctx_is_root = |(range, ctx): (_, SyntaxContextId)| ctx.is_root().then_some(range);
let res = match self {
Definition::Macro(mac) => {
let src = mac.source(sema.db)?;