MCPcopy Create free account
hub / github.com/bedroombuilds/python2rust / main

Function main

0d_files/rust/bufread_iterator.rs:3–9  ·  view source on GitHub ↗

Example using single Stringbuffer and iterators (needs to use Rc!)

()

Source from the content-addressed store, hash-verified

1/// Example using single Stringbuffer and iterators (needs to use Rc!)
2
3fn main() -> std::io::Result<()> {
4 for line in my_reader::BufReader::open("Cargo.toml")? {
5 println!("{}", line?.trim());
6 }
7
8 Ok(())
9}
10
11mod my_reader {
12 use std::{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected