From eef9bdb44125a27915db89c68ad19bb519d3dfe6 Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Wed, 24 Mar 2021 19:22:03 +0800 Subject: refine comment style of tests --- crates/ide_assists/src/handlers/early_return.rs | 20 +++---- crates/ide_assists/src/handlers/unwrap_block.rs | 76 ++++++++++++------------- 2 files changed, 48 insertions(+), 48 deletions(-) (limited to 'crates/ide_assists') diff --git a/crates/ide_assists/src/handlers/early_return.rs b/crates/ide_assists/src/handlers/early_return.rs index 2148df7c8..c66f8c05d 100644 --- a/crates/ide_assists/src/handlers/early_return.rs +++ b/crates/ide_assists/src/handlers/early_return.rs @@ -204,7 +204,7 @@ mod tests { if$0 true { foo(); - //comment + // comment bar(); } } @@ -217,7 +217,7 @@ mod tests { } foo(); - //comment + // comment bar(); } "#, @@ -234,7 +234,7 @@ mod tests { if$0 let Some(n) = n { foo(n); - //comment + // comment bar(); } } @@ -248,7 +248,7 @@ mod tests { }; foo(n); - //comment + // comment bar(); } "#, @@ -288,7 +288,7 @@ mod tests { if$0 let Some(n) = n { foo(n); - //comment + // comment bar(); } } @@ -302,7 +302,7 @@ mod tests { }; foo(n); - //comment + // comment bar(); } "#, @@ -319,7 +319,7 @@ mod tests { if$0 let Some(mut n) = n { foo(n); - //comment + // comment bar(); } } @@ -333,7 +333,7 @@ mod tests { }; foo(n); - //comment + // comment bar(); } "#, @@ -350,7 +350,7 @@ mod tests { if$0 let Some(ref n) = n { foo(n); - //comment + // comment bar(); } } @@ -364,7 +364,7 @@ mod tests { }; foo(n); - //comment + // comment bar(); } "#, diff --git a/crates/ide_assists/src/handlers/unwrap_block.rs b/crates/ide_assists/src/handlers/unwrap_block.rs index 440639322..d3c3da018 100644 --- a/crates/ide_assists/src/handlers/unwrap_block.rs +++ b/crates/ide_assists/src/handlers/unwrap_block.rs @@ -186,7 +186,7 @@ fn main() { if true {$0 foo(); - //comment + // comment bar(); } else { println!("bar"); @@ -198,7 +198,7 @@ fn main() { bar(); foo(); - //comment + // comment bar(); } "#, @@ -215,7 +215,7 @@ fn main() { if true { foo(); - //comment + // comment bar(); } else {$0 println!("bar"); @@ -228,7 +228,7 @@ fn main() { if true { foo(); - //comment + // comment bar(); } println!("bar"); @@ -243,12 +243,12 @@ fn main() { unwrap_block, r#" fn main() { - //bar(); + // bar(); if true { println!("true"); - //comment - //bar(); + // comment + // bar(); } else if false {$0 println!("bar"); } else { @@ -258,12 +258,12 @@ fn main() { "#, r#" fn main() { - //bar(); + // bar(); if true { println!("true"); - //comment - //bar(); + // comment + // bar(); } println!("bar"); } @@ -277,12 +277,12 @@ fn main() { unwrap_block, r#" fn main() { - //bar(); + // bar(); if true { println!("true"); - //comment - //bar(); + // comment + // bar(); } else if false { println!("bar"); } else if true {$0 @@ -292,12 +292,12 @@ fn main() { "#, r#" fn main() { - //bar(); + // bar(); if true { println!("true"); - //comment - //bar(); + // comment + // bar(); } else if false { println!("bar"); } @@ -313,12 +313,12 @@ fn main() { unwrap_block, r#" fn main() { - //bar(); + // bar(); if true { println!("true"); - //comment - //bar(); + // comment + // bar(); } else if false { println!("bar"); } else if true { @@ -330,12 +330,12 @@ fn main() { "#, r#" fn main() { - //bar(); + // bar(); if true { println!("true"); - //comment - //bar(); + // comment + // bar(); } else if false { println!("bar"); } else if true { @@ -353,12 +353,12 @@ fn main() { unwrap_block, r#" fn main() { - //bar(); + // bar(); if true { println!("true"); - //comment - //bar(); + // comment + // bar(); } else if false { println!("bar"); } else if true {$0 @@ -370,12 +370,12 @@ fn main() { "#, r#" fn main() { - //bar(); + // bar(); if true { println!("true"); - //comment - //bar(); + // comment + // bar(); } else if false { println!("bar"); } @@ -395,7 +395,7 @@ fn main() { if true { foo(); - //comment + // comment bar(); } else { println!("bar"); @@ -415,7 +415,7 @@ fn main() { if true { foo(); - //comment + // comment bar(); } else { println!("bar"); @@ -428,7 +428,7 @@ fn main() { if true { foo(); - //comment + // comment bar(); } else { println!("bar"); @@ -448,7 +448,7 @@ fn main() { if true {$0 foo(); - //comment + // comment bar(); } else { println!("bar"); @@ -461,7 +461,7 @@ fn main() { for i in 0..5 { foo(); - //comment + // comment bar(); } } @@ -479,7 +479,7 @@ fn main() { if true { foo(); - //comment + // comment bar(); } else { println!("bar"); @@ -492,7 +492,7 @@ fn main() { if true { foo(); - //comment + // comment bar(); } else { println!("bar"); @@ -512,7 +512,7 @@ fn main() { if true { foo(); - //comment + // comment bar(); } else { println!("bar"); @@ -525,7 +525,7 @@ fn main() { if true { foo(); - //comment + // comment bar(); } else { println!("bar"); @@ -569,7 +569,7 @@ fn main() { if true { foo();$0 - //comment + // comment bar(); } else { println!("bar"); -- cgit v1.2.3