Hi,
I'm currently trying to implement a protocol in rust nightly [1]. The
(stylized) code looks like this:
[...]
trait PlanReader<R: io::Reader> {
// read [s] type
fn read_9p_s(&mut self) -> io::IoResult<~str> {
let n = self.read_le_u16().unwrap();
let s = str::from_chars(self.chars().take(n)).unwrap();
return result::Ok(s);
}
}
[...]
but it throws an error on compiling:
[1]
$ rustc -v
rustc 0.11-pre-nightly (5c0abea 2014-05-01 00:56:48 -0700)
host: x86_64-unknown-linux-gnu
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev