Fix some more basic clippy lints

This commit is contained in:
Lukas Wirth 2021-07-21 20:52:08 +02:00
parent 9485d6efba
commit dfdf6fd9f8
9 changed files with 22 additions and 29 deletions

View file

@ -3,10 +3,7 @@
//!
//! It can be viewed as a dual for `Change`.
use std::{
collections::hash_map::Entry,
iter::{self, FromIterator},
};
use std::{collections::hash_map::Entry, iter};
use base_db::{AnchoredPathBuf, FileId};
use rustc_hash::FxHashMap;
@ -32,7 +29,7 @@ impl SourceChange {
pub fn from_text_edit(file_id: FileId, edit: TextEdit) -> Self {
SourceChange {
source_file_edits: FxHashMap::from_iter(iter::once((file_id, edit))),
source_file_edits: iter::once((file_id, edit)).collect(),
..Default::default()
}
}