@@ -217,7 +217,8 @@ mod tests {
217
217
}
218
218
219
219
fn check_apply_diagnostic_fix_for_target_file ( target_file : & str , fixture : & str , after : & str ) {
220
- let ( analysis, file_id, target_file_contents) = fixture_with_target_file ( fixture, target_file) ;
220
+ let ( analysis, file_id, target_file_contents) =
221
+ fixture_with_target_file ( fixture, target_file) ;
221
222
let diagnostic = analysis. diagnostics ( file_id) . unwrap ( ) . pop ( ) . unwrap ( ) ;
222
223
let mut fix = diagnostic. fix . unwrap ( ) ;
223
224
let edit = fix. source_file_edits . pop ( ) . unwrap ( ) . edit ;
@@ -267,9 +268,9 @@ mod tests {
267
268
pub enum Result<T, E> { Ok(T), Err(E) }
268
269
}
269
270
"# ;
270
- // The formatting here is a bit odd due to how the parse_fixture function works in test_utils -
271
- // it strips empty lines and leading whitespace. The important part of this test is that the final
272
- // `x / y` expr is now wrapped in `Ok(..)`
271
+ // The formatting here is a bit odd due to how the parse_fixture function works in test_utils -
272
+ // it strips empty lines and leading whitespace. The important part of this test is that the final
273
+ // `x / y` expr is now wrapped in `Ok(..)`
273
274
let after = r#"use std::{string::String, result::Result::{self, Ok, Err}};
274
275
fn div(x: i32, y: i32) -> Result<i32, String> {
275
276
if y == 0 {
@@ -299,9 +300,9 @@ fn div(x: i32, y: i32) -> Result<i32, String> {
299
300
pub enum Result<T, E> { Ok(T), Err(E) }
300
301
}
301
302
"# ;
302
- // The formatting here is a bit odd due to how the parse_fixture function works in test_utils -
303
- // it strips empty lines and leading whitespace. The important part of this test is that the final
304
- // expr is now wrapped in `Ok(..)`
303
+ // The formatting here is a bit odd due to how the parse_fixture function works in test_utils -
304
+ // it strips empty lines and leading whitespace. The important part of this test is that the final
305
+ // expr is now wrapped in `Ok(..)`
305
306
let after = r#"use std::result::Result::{self, Ok, Err};
306
307
fn div<T>(x: T) -> Result<T, i32> {
307
308
if x == 0 {
@@ -336,9 +337,9 @@ fn div<T>(x: T) -> Result<T, i32> {
336
337
pub enum Result<T, E> { Ok(T), Err(E) }
337
338
}
338
339
"# ;
339
- // The formatting here is a bit odd due to how the parse_fixture function works in test_utils -
340
- // it strips empty lines and leading whitespace. The important part of this test is that the final
341
- // `x / y` expr is now wrapped in `Ok(..)`
340
+ // The formatting here is a bit odd due to how the parse_fixture function works in test_utils -
341
+ // it strips empty lines and leading whitespace. The important part of this test is that the final
342
+ // `x / y` expr is now wrapped in `Ok(..)`
342
343
let after = r#"use std::{string::String, result::Result::{self, Ok, Err}};
343
344
type MyResult<T> = Result<T, String>;
344
345
fn div(x: i32, y: i32) -> MyResult<i32> {
0 commit comments