apoelstra / rust-jsonrpc

Rust JSONRPC library
Creative Commons Zero v1.0 Universal
158 stars 62 forks source link

Building with `--cfg fuzzing` is broken #81

Closed casey closed 1 year ago

casey commented 1 year ago

It looks like 20da231 broke fuzzing. Building with cargo rustc -- --cfg fuzzing gives the following error:

error[E0277]: the trait bound `&simple_http::TcpStream: std::io::Write` is not satisfied
   --> src/simple_http.rs:184:43
    |
184 |             let mut sock = BufWriter::new(sock.get_ref());
    |                            -------------- ^^^^^^^^^^^^^^ the trait `std::io::Write` is not implemented for `&simple_http::TcpStream`
    |                            |
    |                            required by a bound introduced by this call
    |
    = help: the trait `std::io::Write` is implemented for `simple_http::TcpStream`
    = note: `std::io::Write` is implemented for `&mut simple_http::TcpStream`, but not for `&simple_http::TcpStream`
note: required by a bound in `BufWriter::<W>::new`