Some clippy fixes for 1.36

This commit is contained in:
Jeremy Kolb
2019-07-04 13:26:44 -04:00
parent c6a6e43372
commit 4ad9e986ad
31 changed files with 62 additions and 70 deletions

View File

@@ -107,7 +107,7 @@ pub fn token_tree_to_ast_item_list(tt: &tt::Subtree) -> TreeArc<ast::SourceFile>
impl TokenMap {
pub fn relative_range_of(&self, tt: tt::TokenId) -> Option<TextRange> {
let idx = tt.0 as usize;
self.tokens.get(idx).map(|&it| it)
self.tokens.get(idx).copied()
}
fn alloc(&mut self, relative_range: TextRange) -> tt::TokenId {