These are chat archives for rust-lang/rust

Aug 2016
Romet Tagobert
Aug 21 2016 15:00
Anyone have an idea why the compiler suggests this Ok is unreachable?
fn handle_client(mut stream: TcpStream) -> Result<(), io::Error> {
    try!(perform_exchange(&mut stream));
    loop {
        let pkt = try!(read_drift_packet(&mut stream));
        println!("[+] recv packet {}, len: {}", pkt.len,;
        println!("payload len: {}", pkt.payload.capacity());
Actually, I'm dumb, I just realised try returns with an error straight away. Never mind :) edit: also that my print args are in reverse
Jarred Nicholls
Aug 21 2016 15:09
Jonas Platte
Aug 21 2016 15:56
Opened a bug report about my previous question (rust-lang/rust#35870), if anyone has a similar problem. Seems it is actually a bug and I wasn't doing anything wrong.