Hello, I'm getting following error:
error[E0599]: the method `lines` exists for struct `BufReader<R>`, but its trait bounds were not satisfied
--> src\test\mod.rs:34:46
|
34 | let lines: Vec<String> = self.reader.lines().collect::<Result<_, _>>().unwrap();
| ^^^^^ method cannot be called on `BufReader<R>` due to unsatisfied trait bounds
|
::: C:\Users\42072\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\std\src\io\buffered\bufreader.rs:49:1
|
49 | pub struct BufReader<R> {
| ----------------------- doesn't satisfy `BufReader<R>: BufRead`
|
= note: the following trait bounds were not satisfied:
`R: std::io::Read`
which is required by `BufReader<R>: BufRead`
`BufReader<R>: BufRead`
which is required by `&mut BufReader<R>: BufRead`
And have no idea how to fix it
I would be glad for any help
Code: Rust Playground