diff options
author | Aleksey Kladov <[email protected]> | 2021-06-13 17:27:14 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-06-13 17:27:24 +0100 |
commit | dec207f56a7b16075f68dcb89138d93a7eecdf43 (patch) | |
tree | a9c198dde6ff1845ee3bf634bc0de888f4ef40e5 /crates/ide/src/diagnostics/fixes | |
parent | a1940d8c75bee8c319e7e7f19607bdc4b01c28d4 (diff) |
minor: simplify
Diffstat (limited to 'crates/ide/src/diagnostics/fixes')
-rw-r--r-- | crates/ide/src/diagnostics/fixes/change_case.rs | 4 | ||||
-rw-r--r-- | crates/ide/src/diagnostics/fixes/wrap_tail_expr.rs | 6 |
2 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 42be3375f..db1a37cd6 100644 --- a/crates/ide/src/diagnostics/fixes/change_case.rs +++ b/crates/ide/src/diagnostics/fixes/change_case.rs | |||
@@ -35,7 +35,7 @@ impl DiagnosticWithFixes for IncorrectCase { | |||
35 | #[cfg(test)] | 35 | #[cfg(test)] |
36 | mod change_case { | 36 | mod change_case { |
37 | use crate::{ | 37 | use crate::{ |
38 | diagnostics::tests::{check_fix, check_no_diagnostics}, | 38 | diagnostics::tests::{check_diagnostics, check_fix}, |
39 | fixture, AssistResolveStrategy, DiagnosticsConfig, | 39 | fixture, AssistResolveStrategy, DiagnosticsConfig, |
40 | }; | 40 | }; |
41 | 41 | ||
@@ -102,7 +102,7 @@ fn some_fn() { | |||
102 | 102 | ||
103 | #[test] | 103 | #[test] |
104 | fn test_uppercase_const_no_diagnostics() { | 104 | fn test_uppercase_const_no_diagnostics() { |
105 | check_no_diagnostics( | 105 | check_diagnostics( |
106 | r#" | 106 | r#" |
107 | fn foo() { | 107 | fn foo() { |
108 | const ANOTHER_ITEM$0: &str = "some_item"; | 108 | const ANOTHER_ITEM$0: &str = "some_item"; |
diff --git a/crates/ide/src/diagnostics/fixes/wrap_tail_expr.rs b/crates/ide/src/diagnostics/fixes/wrap_tail_expr.rs index 715a403b9..dcb21e037 100644 --- a/crates/ide/src/diagnostics/fixes/wrap_tail_expr.rs +++ b/crates/ide/src/diagnostics/fixes/wrap_tail_expr.rs | |||
@@ -25,7 +25,7 @@ impl DiagnosticWithFixes for MissingOkOrSomeInTailExpr { | |||
25 | 25 | ||
26 | #[cfg(test)] | 26 | #[cfg(test)] |
27 | mod tests { | 27 | mod tests { |
28 | use crate::diagnostics::tests::{check_fix, check_no_diagnostics}; | 28 | use crate::diagnostics::tests::{check_diagnostics, check_fix}; |
29 | 29 | ||
30 | #[test] | 30 | #[test] |
31 | fn test_wrap_return_type_option() { | 31 | fn test_wrap_return_type_option() { |
@@ -169,7 +169,7 @@ fn div(x: i32, y: i32) -> MyResult<i32> { | |||
169 | 169 | ||
170 | #[test] | 170 | #[test] |
171 | fn test_wrap_return_type_not_applicable_when_expr_type_does_not_match_ok_type() { | 171 | fn test_wrap_return_type_not_applicable_when_expr_type_does_not_match_ok_type() { |
172 | check_no_diagnostics( | 172 | check_diagnostics( |
173 | r#" | 173 | r#" |
174 | //- /main.rs crate:main deps:core | 174 | //- /main.rs crate:main deps:core |
175 | use core::result::Result::{self, Ok, Err}; | 175 | use core::result::Result::{self, Ok, Err}; |
@@ -189,7 +189,7 @@ pub mod option { | |||
189 | 189 | ||
190 | #[test] | 190 | #[test] |
191 | fn test_wrap_return_type_not_applicable_when_return_type_is_not_result_or_option() { | 191 | fn test_wrap_return_type_not_applicable_when_return_type_is_not_result_or_option() { |
192 | check_no_diagnostics( | 192 | check_diagnostics( |
193 | r#" | 193 | r#" |
194 | //- /main.rs crate:main deps:core | 194 | //- /main.rs crate:main deps:core |
195 | use core::result::Result::{self, Ok, Err}; | 195 | use core::result::Result::{self, Ok, Err}; |