Skip to content

Commit 353aa87

Browse files
bors[bot]0xPoe
andauthored
Merge #8184
8184: refine comment style of tests r=Veykril a=hi-rustin Fix the comment style issues, it's in tests but maybe it's a little better to change it to this. Co-authored-by: hi-rustin <rustin.liu@gmail.com>
2 parents 776b1eb + eef9bdb commit 353aa87

File tree

2 files changed

+48
-48
lines changed

2 files changed

+48
-48
lines changed

crates/ide_assists/src/handlers/early_return.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ mod tests {
204204
if$0 true {
205205
foo();
206206
207-
//comment
207+
// comment
208208
bar();
209209
}
210210
}
@@ -217,7 +217,7 @@ mod tests {
217217
}
218218
foo();
219219
220-
//comment
220+
// comment
221221
bar();
222222
}
223223
"#,
@@ -234,7 +234,7 @@ mod tests {
234234
if$0 let Some(n) = n {
235235
foo(n);
236236
237-
//comment
237+
// comment
238238
bar();
239239
}
240240
}
@@ -248,7 +248,7 @@ mod tests {
248248
};
249249
foo(n);
250250
251-
//comment
251+
// comment
252252
bar();
253253
}
254254
"#,
@@ -288,7 +288,7 @@ mod tests {
288288
if$0 let Some(n) = n {
289289
foo(n);
290290
291-
//comment
291+
// comment
292292
bar();
293293
}
294294
}
@@ -302,7 +302,7 @@ mod tests {
302302
};
303303
foo(n);
304304
305-
//comment
305+
// comment
306306
bar();
307307
}
308308
"#,
@@ -319,7 +319,7 @@ mod tests {
319319
if$0 let Some(mut n) = n {
320320
foo(n);
321321
322-
//comment
322+
// comment
323323
bar();
324324
}
325325
}
@@ -333,7 +333,7 @@ mod tests {
333333
};
334334
foo(n);
335335
336-
//comment
336+
// comment
337337
bar();
338338
}
339339
"#,
@@ -350,7 +350,7 @@ mod tests {
350350
if$0 let Some(ref n) = n {
351351
foo(n);
352352
353-
//comment
353+
// comment
354354
bar();
355355
}
356356
}
@@ -364,7 +364,7 @@ mod tests {
364364
};
365365
foo(n);
366366
367-
//comment
367+
// comment
368368
bar();
369369
}
370370
"#,

crates/ide_assists/src/handlers/unwrap_block.rs

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ fn main() {
186186
if true {$0
187187
foo();
188188
189-
//comment
189+
// comment
190190
bar();
191191
} else {
192192
println!("bar");
@@ -198,7 +198,7 @@ fn main() {
198198
bar();
199199
foo();
200200
201-
//comment
201+
// comment
202202
bar();
203203
}
204204
"#,
@@ -215,7 +215,7 @@ fn main() {
215215
if true {
216216
foo();
217217
218-
//comment
218+
// comment
219219
bar();
220220
} else {$0
221221
println!("bar");
@@ -228,7 +228,7 @@ fn main() {
228228
if true {
229229
foo();
230230
231-
//comment
231+
// comment
232232
bar();
233233
}
234234
println!("bar");
@@ -243,12 +243,12 @@ fn main() {
243243
unwrap_block,
244244
r#"
245245
fn main() {
246-
//bar();
246+
// bar();
247247
if true {
248248
println!("true");
249249
250-
//comment
251-
//bar();
250+
// comment
251+
// bar();
252252
} else if false {$0
253253
println!("bar");
254254
} else {
@@ -258,12 +258,12 @@ fn main() {
258258
"#,
259259
r#"
260260
fn main() {
261-
//bar();
261+
// bar();
262262
if true {
263263
println!("true");
264264
265-
//comment
266-
//bar();
265+
// comment
266+
// bar();
267267
}
268268
println!("bar");
269269
}
@@ -277,12 +277,12 @@ fn main() {
277277
unwrap_block,
278278
r#"
279279
fn main() {
280-
//bar();
280+
// bar();
281281
if true {
282282
println!("true");
283283
284-
//comment
285-
//bar();
284+
// comment
285+
// bar();
286286
} else if false {
287287
println!("bar");
288288
} else if true {$0
@@ -292,12 +292,12 @@ fn main() {
292292
"#,
293293
r#"
294294
fn main() {
295-
//bar();
295+
// bar();
296296
if true {
297297
println!("true");
298298
299-
//comment
300-
//bar();
299+
// comment
300+
// bar();
301301
} else if false {
302302
println!("bar");
303303
}
@@ -313,12 +313,12 @@ fn main() {
313313
unwrap_block,
314314
r#"
315315
fn main() {
316-
//bar();
316+
// bar();
317317
if true {
318318
println!("true");
319319
320-
//comment
321-
//bar();
320+
// comment
321+
// bar();
322322
} else if false {
323323
println!("bar");
324324
} else if true {
@@ -330,12 +330,12 @@ fn main() {
330330
"#,
331331
r#"
332332
fn main() {
333-
//bar();
333+
// bar();
334334
if true {
335335
println!("true");
336336
337-
//comment
338-
//bar();
337+
// comment
338+
// bar();
339339
} else if false {
340340
println!("bar");
341341
} else if true {
@@ -353,12 +353,12 @@ fn main() {
353353
unwrap_block,
354354
r#"
355355
fn main() {
356-
//bar();
356+
// bar();
357357
if true {
358358
println!("true");
359359
360-
//comment
361-
//bar();
360+
// comment
361+
// bar();
362362
} else if false {
363363
println!("bar");
364364
} else if true {$0
@@ -370,12 +370,12 @@ fn main() {
370370
"#,
371371
r#"
372372
fn main() {
373-
//bar();
373+
// bar();
374374
if true {
375375
println!("true");
376376
377-
//comment
378-
//bar();
377+
// comment
378+
// bar();
379379
} else if false {
380380
println!("bar");
381381
}
@@ -395,7 +395,7 @@ fn main() {
395395
if true {
396396
foo();
397397
398-
//comment
398+
// comment
399399
bar();
400400
} else {
401401
println!("bar");
@@ -415,7 +415,7 @@ fn main() {
415415
if true {
416416
foo();
417417
418-
//comment
418+
// comment
419419
bar();
420420
} else {
421421
println!("bar");
@@ -428,7 +428,7 @@ fn main() {
428428
if true {
429429
foo();
430430
431-
//comment
431+
// comment
432432
bar();
433433
} else {
434434
println!("bar");
@@ -448,7 +448,7 @@ fn main() {
448448
if true {$0
449449
foo();
450450
451-
//comment
451+
// comment
452452
bar();
453453
} else {
454454
println!("bar");
@@ -461,7 +461,7 @@ fn main() {
461461
for i in 0..5 {
462462
foo();
463463
464-
//comment
464+
// comment
465465
bar();
466466
}
467467
}
@@ -479,7 +479,7 @@ fn main() {
479479
if true {
480480
foo();
481481
482-
//comment
482+
// comment
483483
bar();
484484
} else {
485485
println!("bar");
@@ -492,7 +492,7 @@ fn main() {
492492
if true {
493493
foo();
494494
495-
//comment
495+
// comment
496496
bar();
497497
} else {
498498
println!("bar");
@@ -512,7 +512,7 @@ fn main() {
512512
if true {
513513
foo();
514514
515-
//comment
515+
// comment
516516
bar();
517517
} else {
518518
println!("bar");
@@ -525,7 +525,7 @@ fn main() {
525525
if true {
526526
foo();
527527
528-
//comment
528+
// comment
529529
bar();
530530
} else {
531531
println!("bar");
@@ -569,7 +569,7 @@ fn main() {
569569
if true {
570570
foo();$0
571571
572-
//comment
572+
// comment
573573
bar();
574574
} else {
575575
println!("bar");

0 commit comments

Comments
 (0)