Clippy lints

This commit is contained in:
kjeremy 2019-12-20 15:14:30 -05:00
parent 9467f81c58
commit 0d5d63a80e
16 changed files with 67 additions and 77 deletions

View file

@ -138,7 +138,7 @@ fn to_col_number(db: &dyn AstDatabase, file: HirFileId, pos: TextUnit) -> usize
if c == '\n' {
break;
}
col_num = col_num + 1;
col_num += 1;
}
col_num
}

View file

@ -93,12 +93,11 @@ pub(crate) fn macro_def(
Some(Arc::new((TokenExpander::MacroRules(rules), tmap)))
}
MacroDefKind::BuiltIn(expander) => {
Some(Arc::new((TokenExpander::Builtin(expander.clone()), mbe::TokenMap::default())))
Some(Arc::new((TokenExpander::Builtin(expander), mbe::TokenMap::default())))
}
MacroDefKind::BuiltInDerive(expander) => {
Some(Arc::new((TokenExpander::BuiltinDerive(expander), mbe::TokenMap::default())))
}
MacroDefKind::BuiltInDerive(expander) => Some(Arc::new((
TokenExpander::BuiltinDerive(expander.clone()),
mbe::TokenMap::default(),
))),
}
}