From 4f6f3933ec04df55a39368d591c91cf81d980237 Mon Sep 17 00:00:00 2001 From: Phil Ellison Date: Sun, 11 Aug 2019 15:04:08 +0100 Subject: cargo format --- crates/ra_ide_api/src/diagnostics.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'crates/ra_ide_api') diff --git a/crates/ra_ide_api/src/diagnostics.rs b/crates/ra_ide_api/src/diagnostics.rs index 9841fbdf3..0b9bb5a66 100644 --- a/crates/ra_ide_api/src/diagnostics.rs +++ b/crates/ra_ide_api/src/diagnostics.rs @@ -217,7 +217,8 @@ mod tests { } fn check_apply_diagnostic_fix_for_target_file(target_file: &str, fixture: &str, after: &str) { - let (analysis, file_id, target_file_contents) = fixture_with_target_file(fixture, target_file); + let (analysis, file_id, target_file_contents) = + fixture_with_target_file(fixture, target_file); let diagnostic = analysis.diagnostics(file_id).unwrap().pop().unwrap(); let mut fix = diagnostic.fix.unwrap(); let edit = fix.source_file_edits.pop().unwrap().edit; @@ -267,9 +268,9 @@ mod tests { pub enum Result { Ok(T), Err(E) } } "#; -// The formatting here is a bit odd due to how the parse_fixture function works in test_utils - -// it strips empty lines and leading whitespace. The important part of this test is that the final -// `x / y` expr is now wrapped in `Ok(..)` + // The formatting here is a bit odd due to how the parse_fixture function works in test_utils - + // it strips empty lines and leading whitespace. The important part of this test is that the final + // `x / y` expr is now wrapped in `Ok(..)` let after = r#"use std::{string::String, result::Result::{self, Ok, Err}}; fn div(x: i32, y: i32) -> Result { if y == 0 { @@ -299,9 +300,9 @@ fn div(x: i32, y: i32) -> Result { pub enum Result { Ok(T), Err(E) } } "#; -// The formatting here is a bit odd due to how the parse_fixture function works in test_utils - -// it strips empty lines and leading whitespace. The important part of this test is that the final -// expr is now wrapped in `Ok(..)` + // The formatting here is a bit odd due to how the parse_fixture function works in test_utils - + // it strips empty lines and leading whitespace. The important part of this test is that the final + // expr is now wrapped in `Ok(..)` let after = r#"use std::result::Result::{self, Ok, Err}; fn div(x: T) -> Result { if x == 0 { @@ -336,9 +337,9 @@ fn div(x: T) -> Result { pub enum Result { Ok(T), Err(E) } } "#; -// The formatting here is a bit odd due to how the parse_fixture function works in test_utils - -// it strips empty lines and leading whitespace. The important part of this test is that the final -// `x / y` expr is now wrapped in `Ok(..)` + // The formatting here is a bit odd due to how the parse_fixture function works in test_utils - + // it strips empty lines and leading whitespace. The important part of this test is that the final + // `x / y` expr is now wrapped in `Ok(..)` let after = r#"use std::{string::String, result::Result::{self, Ok, Err}}; type MyResult = Result; fn div(x: i32, y: i32) -> MyResult { -- cgit v1.2.3