clippy::redundant_field_names
This commit is contained in:
parent
b857a5dcf0
commit
aabd41cafc
@ -275,7 +275,7 @@ pub(super) fn infer_pat(
|
||||
if !self.unify(&ty, &expected) {
|
||||
self.result
|
||||
.type_mismatches
|
||||
.insert(pat.into(), TypeMismatch { expected: expected, actual: ty.clone() });
|
||||
.insert(pat.into(), TypeMismatch { expected, actual: ty.clone() });
|
||||
}
|
||||
self.write_pat_ty(pat, ty.clone());
|
||||
ty
|
||||
|
@ -292,7 +292,7 @@ pub(crate) fn replace_ast<N: AstNode>(&mut self, old: N, new: N) {
|
||||
}
|
||||
pub(crate) fn create_file(&mut self, dst: AnchoredPathBuf, content: impl Into<String>) {
|
||||
let file_system_edit =
|
||||
FileSystemEdit::CreateFile { dst: dst, initial_contents: content.into() };
|
||||
FileSystemEdit::CreateFile { dst, initial_contents: content.into() };
|
||||
self.source_change.push_file_system_edit(file_system_edit);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ enum State {
|
||||
impl FormatStrParser {
|
||||
pub(crate) fn new(input: String) -> Self {
|
||||
Self {
|
||||
input: input,
|
||||
input,
|
||||
output: String::new(),
|
||||
extracted_expressions: Vec::new(),
|
||||
state: State::NotExpr,
|
||||
|
@ -75,7 +75,7 @@ pub(crate) fn single_file(code: &str) -> (ide_db::RootDatabase, FilePosition, Ve
|
||||
match range_or_offset {
|
||||
RangeOrOffset::Range(range) => {
|
||||
position = FilePosition { file_id, offset: range.start() };
|
||||
selections = vec![FileRange { file_id, range: range }];
|
||||
selections = vec![FileRange { file_id, range }];
|
||||
}
|
||||
RangeOrOffset::Offset(offset) => {
|
||||
position = FilePosition { file_id, offset };
|
||||
|
@ -55,7 +55,7 @@ pub(super) fn transcribe(
|
||||
template: &MetaTemplate,
|
||||
bindings: &Bindings,
|
||||
) -> ExpandResult<tt::Subtree> {
|
||||
let mut ctx = ExpandCtx { bindings: bindings, nesting: Vec::new() };
|
||||
let mut ctx = ExpandCtx { bindings, nesting: Vec::new() };
|
||||
let mut arena: Vec<tt::TokenTree> = Vec::new();
|
||||
expand_subtree(&mut ctx, template, None, &mut arena)
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ fn next(&mut self) -> Option<Self::Item> {
|
||||
impl Diagnostic {
|
||||
/// Creates a new diagnostic with the given `level` and `message`.
|
||||
pub fn new<T: Into<String>>(level: Level, message: T) -> Diagnostic {
|
||||
Diagnostic { level: level, message: message.into(), spans: vec![], children: vec![] }
|
||||
Diagnostic { level, message: message.into(), spans: vec![], children: vec![] }
|
||||
}
|
||||
|
||||
/// Creates a new diagnostic with the given `level` and `message` pointing to
|
||||
@ -102,7 +102,7 @@ pub fn spanned<S, T>(spans: S, level: Level, message: T) -> Diagnostic
|
||||
T: Into<String>,
|
||||
{
|
||||
Diagnostic {
|
||||
level: level,
|
||||
level,
|
||||
message: message.into(),
|
||||
spans: spans.into_spans(),
|
||||
children: vec![],
|
||||
|
Loading…
Reference in New Issue
Block a user