I know what the error is, but rustc gives a wrong span. The buf_reader.get_mut()
part should have the span instead of the ::byte_stream_splitter::ByteStreamSplitter::new
part.
Why does rustc do this?
--> src/smartfox.rs:110:24
|
110 | let splitter = ::byte_stream_splitter::ByteStreamSplitter::new(buf_reader.get_mut(), SPLIT);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::io::BufRead` is not implemented for `std::net::TcpStream`
|
= note: required by `<byte_stream_splitter::ByteStreamSplitter<'a, T>>::new`
Type of buf_reader
is Box<BufReader<TcpStream>>
byte_stream_splitter
is a crate at crates.io ( version 0.1.4 )