I don't know rust at all, and it's really different from other languages I
am used to.

I need to change the socket.rs from write() to write_all() however this
changes the returned result from a number to a void:

impl Write for TTcpChannel {
    fn write(&mut self, b: &[u8]) -> io::Result<usize> {
        self.if_set(|s| s.write*_all*(b))
    }

    fn flush(&mut self) -> io::Result<()> {
        self.if_set(|s| s.flush())
    }
}

How do I code up, "and return b.len()" in rust so that it always returns
the length of b?
Thanks,

Jim

Reply via email to