aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src/diagnostics/fixes/change_case.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src/diagnostics/fixes/change_case.rs')
-rw-r--r--crates/ide/src/diagnostics/fixes/change_case.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ide/src/diagnostics/fixes/change_case.rs b/crates/ide/src/diagnostics/fixes/change_case.rs
index 80aca58a1..42be3375f 100644
--- a/crates/ide/src/diagnostics/fixes/change_case.rs
+++ b/crates/ide/src/diagnostics/fixes/change_case.rs
@@ -4,16 +4,16 @@ use ide_db::{base_db::FilePosition, RootDatabase};
4use syntax::AstNode; 4use syntax::AstNode;
5 5
6use crate::{ 6use crate::{
7 diagnostics::{unresolved_fix, DiagnosticWithFix}, 7 diagnostics::{unresolved_fix, DiagnosticWithFixes},
8 references::rename::rename_with_semantics, 8 references::rename::rename_with_semantics,
9}; 9};
10 10
11impl DiagnosticWithFix for IncorrectCase { 11impl DiagnosticWithFixes for IncorrectCase {
12 fn fix( 12 fn fixes(
13 &self, 13 &self,
14 sema: &Semantics<RootDatabase>, 14 sema: &Semantics<RootDatabase>,
15 resolve: &AssistResolveStrategy, 15 resolve: &AssistResolveStrategy,
16 ) -> Option<Assist> { 16 ) -> Option<Vec<Assist>> {
17 let root = sema.db.parse_or_expand(self.file)?; 17 let root = sema.db.parse_or_expand(self.file)?;
18 let name_node = self.ident.to_node(&root); 18 let name_node = self.ident.to_node(&root);
19 19
@@ -28,7 +28,7 @@ impl DiagnosticWithFix for IncorrectCase {
28 res.source_change = Some(source_change.ok().unwrap_or_default()); 28 res.source_change = Some(source_change.ok().unwrap_or_default());
29 } 29 }
30 30
31 Some(res) 31 Some(vec![res])
32 } 32 }
33} 33}
34 34