(path: impl AsRef<std::path::Path>)
| 26 | |
| 27 | impl BufReader { |
| 28 | pub fn open(path: impl AsRef<std::path::Path>) -> io::Result<Self> { |
| 29 | let file = File::open(path)?; |
| 30 | let reader = io::BufReader::new(file); |
| 31 | let buf = new_buf(); |
| 32 | |
| 33 | Ok(Self { reader, buf }) |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | impl Iterator for BufReader { |