2625: Clippy lints r=matklad a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
This commit is contained in:
bors[bot] 2019-12-21 06:12:36 +00:00 committed by GitHub
commit 1cbef27ff8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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(),
))),
}
}