Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/unresolved_method.rs')
-rw-r--r--crates/ide-diagnostics/src/handlers/unresolved_method.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/crates/ide-diagnostics/src/handlers/unresolved_method.rs b/crates/ide-diagnostics/src/handlers/unresolved_method.rs
index 35e7521af7..e6e86214bb 100644
--- a/crates/ide-diagnostics/src/handlers/unresolved_method.rs
+++ b/crates/ide-diagnostics/src/handlers/unresolved_method.rs
@@ -1,4 +1,4 @@
-use hir::{db::ExpandDatabase, FileRange, HirDisplay, InFile};
+use hir::{FileRange, HirDisplay, InFile, db::ExpandDatabase};
use ide_db::text_edit::TextEdit;
use ide_db::{
assists::{Assist, AssistId, AssistKind},
@@ -6,11 +6,12 @@ use ide_db::{
source_change::SourceChange,
};
use syntax::{
- ast::{self, make, HasArgList},
- format_smolstr, AstNode, SmolStr, TextRange, ToSmolStr,
+ AstNode, SmolStr, TextRange, ToSmolStr,
+ ast::{self, HasArgList, make},
+ format_smolstr,
};
-use crate::{adjusted_display_range, Diagnostic, DiagnosticCode, DiagnosticsContext};
+use crate::{Diagnostic, DiagnosticCode, DiagnosticsContext, adjusted_display_range};
// Diagnostic: unresolved-method
//
@@ -67,11 +68,7 @@ fn fixes(ctx: &DiagnosticsContext<'_>, d: &hir::UnresolvedMethodCall) -> Option<
fixes.push(assoc_func_fix);
}
- if fixes.is_empty() {
- None
- } else {
- Some(fixes)
- }
+ if fixes.is_empty() { None } else { Some(fixes) }
}
fn field_fix(