mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Fix some more basic clippy lints
This commit is contained in:
parent
9485d6efba
commit
dfdf6fd9f8
9 changed files with 22 additions and 29 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue