diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-24 11:31:51 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-24 11:31:51 +0000 |
commit | 353aa870328ca2a449fa9eab69b0adfa4c181a4d (patch) | |
tree | 38a85431077860e6db4999b962594b36521b65ff /crates/ide_assists | |
parent | 776b1ebcb40024db87c60138ce139e3968e75a88 (diff) | |
parent | eef9bdb44125a27915db89c68ad19bb519d3dfe6 (diff) |
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 <[email protected]>
Diffstat (limited to 'crates/ide_assists')
-rw-r--r-- | crates/ide_assists/src/handlers/early_return.rs | 20 | ||||
-rw-r--r-- | crates/ide_assists/src/handlers/unwrap_block.rs | 76 |
2 files changed, 48 insertions, 48 deletions
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 { | |||
204 | if$0 true { | 204 | if$0 true { |
205 | foo(); | 205 | foo(); |
206 | 206 | ||
207 | //comment | 207 | // comment |
208 | bar(); | 208 | bar(); |
209 | } | 209 | } |
210 | } | 210 | } |
@@ -217,7 +217,7 @@ mod tests { | |||
217 | } | 217 | } |
218 | foo(); | 218 | foo(); |
219 | 219 | ||
220 | //comment | 220 | // comment |
221 | bar(); | 221 | bar(); |
222 | } | 222 | } |
223 | "#, | 223 | "#, |
@@ -234,7 +234,7 @@ mod tests { | |||
234 | if$0 let Some(n) = n { | 234 | if$0 let Some(n) = n { |
235 | foo(n); | 235 | foo(n); |
236 | 236 | ||
237 | //comment | 237 | // comment |
238 | bar(); | 238 | bar(); |
239 | } | 239 | } |
240 | } | 240 | } |
@@ -248,7 +248,7 @@ mod tests { | |||
248 | }; | 248 | }; |
249 | foo(n); | 249 | foo(n); |
250 | 250 | ||
251 | //comment | 251 | // comment |
252 | bar(); | 252 | bar(); |
253 | } | 253 | } |
254 | "#, | 254 | "#, |
@@ -288,7 +288,7 @@ mod tests { | |||
288 | if$0 let Some(n) = n { | 288 | if$0 let Some(n) = n { |
289 | foo(n); | 289 | foo(n); |
290 | 290 | ||
291 | //comment | 291 | // comment |
292 | bar(); | 292 | bar(); |
293 | } | 293 | } |
294 | } | 294 | } |
@@ -302,7 +302,7 @@ mod tests { | |||
302 | }; | 302 | }; |
303 | foo(n); | 303 | foo(n); |
304 | 304 | ||
305 | //comment | 305 | // comment |
306 | bar(); | 306 | bar(); |
307 | } | 307 | } |
308 | "#, | 308 | "#, |
@@ -319,7 +319,7 @@ mod tests { | |||
319 | if$0 let Some(mut n) = n { | 319 | if$0 let Some(mut n) = n { |
320 | foo(n); | 320 | foo(n); |
321 | 321 | ||
322 | //comment | 322 | // comment |
323 | bar(); | 323 | bar(); |
324 | } | 324 | } |
325 | } | 325 | } |
@@ -333,7 +333,7 @@ mod tests { | |||
333 | }; | 333 | }; |
334 | foo(n); | 334 | foo(n); |
335 | 335 | ||
336 | //comment | 336 | // comment |
337 | bar(); | 337 | bar(); |
338 | } | 338 | } |
339 | "#, | 339 | "#, |
@@ -350,7 +350,7 @@ mod tests { | |||
350 | if$0 let Some(ref n) = n { | 350 | if$0 let Some(ref n) = n { |
351 | foo(n); | 351 | foo(n); |
352 | 352 | ||
353 | //comment | 353 | // comment |
354 | bar(); | 354 | bar(); |
355 | } | 355 | } |
356 | } | 356 | } |
@@ -364,7 +364,7 @@ mod tests { | |||
364 | }; | 364 | }; |
365 | foo(n); | 365 | foo(n); |
366 | 366 | ||
367 | //comment | 367 | // comment |
368 | bar(); | 368 | bar(); |
369 | } | 369 | } |
370 | "#, | 370 | "#, |
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() { | |||
186 | if true {$0 | 186 | if true {$0 |
187 | foo(); | 187 | foo(); |
188 | 188 | ||
189 | //comment | 189 | // comment |
190 | bar(); | 190 | bar(); |
191 | } else { | 191 | } else { |
192 | println!("bar"); | 192 | println!("bar"); |
@@ -198,7 +198,7 @@ fn main() { | |||
198 | bar(); | 198 | bar(); |
199 | foo(); | 199 | foo(); |
200 | 200 | ||
201 | //comment | 201 | // comment |
202 | bar(); | 202 | bar(); |
203 | } | 203 | } |
204 | "#, | 204 | "#, |
@@ -215,7 +215,7 @@ fn main() { | |||
215 | if true { | 215 | if true { |
216 | foo(); | 216 | foo(); |
217 | 217 | ||
218 | //comment | 218 | // comment |
219 | bar(); | 219 | bar(); |
220 | } else {$0 | 220 | } else {$0 |
221 | println!("bar"); | 221 | println!("bar"); |
@@ -228,7 +228,7 @@ fn main() { | |||
228 | if true { | 228 | if true { |
229 | foo(); | 229 | foo(); |
230 | 230 | ||
231 | //comment | 231 | // comment |
232 | bar(); | 232 | bar(); |
233 | } | 233 | } |
234 | println!("bar"); | 234 | println!("bar"); |
@@ -243,12 +243,12 @@ fn main() { | |||
243 | unwrap_block, | 243 | unwrap_block, |
244 | r#" | 244 | r#" |
245 | fn main() { | 245 | fn main() { |
246 | //bar(); | 246 | // bar(); |
247 | if true { | 247 | if true { |
248 | println!("true"); | 248 | println!("true"); |
249 | 249 | ||
250 | //comment | 250 | // comment |
251 | //bar(); | 251 | // bar(); |
252 | } else if false {$0 | 252 | } else if false {$0 |
253 | println!("bar"); | 253 | println!("bar"); |
254 | } else { | 254 | } else { |
@@ -258,12 +258,12 @@ fn main() { | |||
258 | "#, | 258 | "#, |
259 | r#" | 259 | r#" |
260 | fn main() { | 260 | fn main() { |
261 | //bar(); | 261 | // bar(); |
262 | if true { | 262 | if true { |
263 | println!("true"); | 263 | println!("true"); |
264 | 264 | ||
265 | //comment | 265 | // comment |
266 | //bar(); | 266 | // bar(); |
267 | } | 267 | } |
268 | println!("bar"); | 268 | println!("bar"); |
269 | } | 269 | } |
@@ -277,12 +277,12 @@ fn main() { | |||
277 | unwrap_block, | 277 | unwrap_block, |
278 | r#" | 278 | r#" |
279 | fn main() { | 279 | fn main() { |
280 | //bar(); | 280 | // bar(); |
281 | if true { | 281 | if true { |
282 | println!("true"); | 282 | println!("true"); |
283 | 283 | ||
284 | //comment | 284 | // comment |
285 | //bar(); | 285 | // bar(); |
286 | } else if false { | 286 | } else if false { |
287 | println!("bar"); | 287 | println!("bar"); |
288 | } else if true {$0 | 288 | } else if true {$0 |
@@ -292,12 +292,12 @@ fn main() { | |||
292 | "#, | 292 | "#, |
293 | r#" | 293 | r#" |
294 | fn main() { | 294 | fn main() { |
295 | //bar(); | 295 | // bar(); |
296 | if true { | 296 | if true { |
297 | println!("true"); | 297 | println!("true"); |
298 | 298 | ||
299 | //comment | 299 | // comment |
300 | //bar(); | 300 | // bar(); |
301 | } else if false { | 301 | } else if false { |
302 | println!("bar"); | 302 | println!("bar"); |
303 | } | 303 | } |
@@ -313,12 +313,12 @@ fn main() { | |||
313 | unwrap_block, | 313 | unwrap_block, |
314 | r#" | 314 | r#" |
315 | fn main() { | 315 | fn main() { |
316 | //bar(); | 316 | // bar(); |
317 | if true { | 317 | if true { |
318 | println!("true"); | 318 | println!("true"); |
319 | 319 | ||
320 | //comment | 320 | // comment |
321 | //bar(); | 321 | // bar(); |
322 | } else if false { | 322 | } else if false { |
323 | println!("bar"); | 323 | println!("bar"); |
324 | } else if true { | 324 | } else if true { |
@@ -330,12 +330,12 @@ fn main() { | |||
330 | "#, | 330 | "#, |
331 | r#" | 331 | r#" |
332 | fn main() { | 332 | fn main() { |
333 | //bar(); | 333 | // bar(); |
334 | if true { | 334 | if true { |
335 | println!("true"); | 335 | println!("true"); |
336 | 336 | ||
337 | //comment | 337 | // comment |
338 | //bar(); | 338 | // bar(); |
339 | } else if false { | 339 | } else if false { |
340 | println!("bar"); | 340 | println!("bar"); |
341 | } else if true { | 341 | } else if true { |
@@ -353,12 +353,12 @@ fn main() { | |||
353 | unwrap_block, | 353 | unwrap_block, |
354 | r#" | 354 | r#" |
355 | fn main() { | 355 | fn main() { |
356 | //bar(); | 356 | // bar(); |
357 | if true { | 357 | if true { |
358 | println!("true"); | 358 | println!("true"); |
359 | 359 | ||
360 | //comment | 360 | // comment |
361 | //bar(); | 361 | // bar(); |
362 | } else if false { | 362 | } else if false { |
363 | println!("bar"); | 363 | println!("bar"); |
364 | } else if true {$0 | 364 | } else if true {$0 |
@@ -370,12 +370,12 @@ fn main() { | |||
370 | "#, | 370 | "#, |
371 | r#" | 371 | r#" |
372 | fn main() { | 372 | fn main() { |
373 | //bar(); | 373 | // bar(); |
374 | if true { | 374 | if true { |
375 | println!("true"); | 375 | println!("true"); |
376 | 376 | ||
377 | //comment | 377 | // comment |
378 | //bar(); | 378 | // bar(); |
379 | } else if false { | 379 | } else if false { |
380 | println!("bar"); | 380 | println!("bar"); |
381 | } | 381 | } |
@@ -395,7 +395,7 @@ fn main() { | |||
395 | if true { | 395 | if true { |
396 | foo(); | 396 | foo(); |
397 | 397 | ||
398 | //comment | 398 | // comment |
399 | bar(); | 399 | bar(); |
400 | } else { | 400 | } else { |
401 | println!("bar"); | 401 | println!("bar"); |
@@ -415,7 +415,7 @@ fn main() { | |||
415 | if true { | 415 | if true { |
416 | foo(); | 416 | foo(); |
417 | 417 | ||
418 | //comment | 418 | // comment |
419 | bar(); | 419 | bar(); |
420 | } else { | 420 | } else { |
421 | println!("bar"); | 421 | println!("bar"); |
@@ -428,7 +428,7 @@ fn main() { | |||
428 | if true { | 428 | if true { |
429 | foo(); | 429 | foo(); |
430 | 430 | ||
431 | //comment | 431 | // comment |
432 | bar(); | 432 | bar(); |
433 | } else { | 433 | } else { |
434 | println!("bar"); | 434 | println!("bar"); |
@@ -448,7 +448,7 @@ fn main() { | |||
448 | if true {$0 | 448 | if true {$0 |
449 | foo(); | 449 | foo(); |
450 | 450 | ||
451 | //comment | 451 | // comment |
452 | bar(); | 452 | bar(); |
453 | } else { | 453 | } else { |
454 | println!("bar"); | 454 | println!("bar"); |
@@ -461,7 +461,7 @@ fn main() { | |||
461 | for i in 0..5 { | 461 | for i in 0..5 { |
462 | foo(); | 462 | foo(); |
463 | 463 | ||
464 | //comment | 464 | // comment |
465 | bar(); | 465 | bar(); |
466 | } | 466 | } |
467 | } | 467 | } |
@@ -479,7 +479,7 @@ fn main() { | |||
479 | if true { | 479 | if true { |
480 | foo(); | 480 | foo(); |
481 | 481 | ||
482 | //comment | 482 | // comment |
483 | bar(); | 483 | bar(); |
484 | } else { | 484 | } else { |
485 | println!("bar"); | 485 | println!("bar"); |
@@ -492,7 +492,7 @@ fn main() { | |||
492 | if true { | 492 | if true { |
493 | foo(); | 493 | foo(); |
494 | 494 | ||
495 | //comment | 495 | // comment |
496 | bar(); | 496 | bar(); |
497 | } else { | 497 | } else { |
498 | println!("bar"); | 498 | println!("bar"); |
@@ -512,7 +512,7 @@ fn main() { | |||
512 | if true { | 512 | if true { |
513 | foo(); | 513 | foo(); |
514 | 514 | ||
515 | //comment | 515 | // comment |
516 | bar(); | 516 | bar(); |
517 | } else { | 517 | } else { |
518 | println!("bar"); | 518 | println!("bar"); |
@@ -525,7 +525,7 @@ fn main() { | |||
525 | if true { | 525 | if true { |
526 | foo(); | 526 | foo(); |
527 | 527 | ||
528 | //comment | 528 | // comment |
529 | bar(); | 529 | bar(); |
530 | } else { | 530 | } else { |
531 | println!("bar"); | 531 | println!("bar"); |
@@ -569,7 +569,7 @@ fn main() { | |||
569 | if true { | 569 | if true { |
570 | foo();$0 | 570 | foo();$0 |
571 | 571 | ||
572 | //comment | 572 | // comment |
573 | bar(); | 573 | bar(); |
574 | } else { | 574 | } else { |
575 | println!("bar"); | 575 | println!("bar"); |