Skip to content
Snippets Groups Projects
Commit 0b181505 authored by Michal Sojka's avatar Michal Sojka
Browse files

lab5: Mention use of std::io::BufRead in the Rust template

parent 881f26da
No related branches found
No related tags found
No related merge requests found
Pipeline #55408 passed
......@@ -120,6 +120,8 @@ potřeba uvolnit funkcí `free()`.
{{< /tab >}}
{{< tab "Rust" >}}
```rust
use std::io::BufRead;
for line in std::io::stdin().lock().lines().map(|l| l.unwrap()) {
if let Some((num, word)) = line.split_once(' ') {
let x = num.parse::<usize>()?;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment