You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-25 02:06:46 +02:00
Miscellaneous minor improvements (#2370)
This commit is contained in:
@ -19,3 +19,15 @@ fn main() {
|
||||
print!("elements searched: {elements_searched}");
|
||||
}
|
||||
```
|
||||
|
||||
<details>
|
||||
|
||||
- Labeled break also works on arbitrary blocks, e.g.
|
||||
```rust
|
||||
'label: {
|
||||
break 'label;
|
||||
println!("This line gets skipped");
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
|
@ -30,7 +30,7 @@ initial `n`.
|
||||
todo!("Implement this")
|
||||
}
|
||||
|
||||
{{#include exercise.rs:tests}}
|
||||
|
||||
{{#include exercise.rs:main}}
|
||||
todo!("Implement this")
|
||||
}
|
||||
```
|
||||
|
@ -34,6 +34,6 @@ fn test_collatz_length() {
|
||||
|
||||
// ANCHOR: main
|
||||
fn main() {
|
||||
// ANCHOR_END: main
|
||||
println!("Length: {}", collatz_length(11));
|
||||
}
|
||||
// ANCHOR_END: main
|
||||
|
Reference in New Issue
Block a user