1
0
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:
Nicole L
2024-09-20 14:19:53 -07:00
committed by GitHub
parent aeb643f380
commit 2f9babd098
11 changed files with 57 additions and 37 deletions

View File

@ -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>

View File

@ -30,7 +30,7 @@ initial `n`.
todo!("Implement this")
}
{{#include exercise.rs:tests}}
{{#include exercise.rs:main}}
todo!("Implement this")
}
```

View File

@ -34,6 +34,6 @@ fn test_collatz_length() {
// ANCHOR: main
fn main() {
// ANCHOR_END: main
println!("Length: {}", collatz_length(11));
}
// ANCHOR_END: main