How is it different from having the generic on the trait itself? On Mar 22, 2014 10:44 AM, "comex" <[email protected]> wrote:
> On Sat, Mar 22, 2014 at 10:24 AM, Edward Wang <[email protected]> > wrote: > > But of course, it is very uncivilized :) Any suggestion on how to > refactor > > this piece of code so it won't violate the lifetime requirement? > > To be drastic, if Encodable were > > pub trait Encodable { > fn encode<S: Encoder>(&self, s: &mut S); > } > > wouldn't it avoid this problem? > _______________________________________________ > Rust-dev mailing list > [email protected] > https://mail.mozilla.org/listinfo/rust-dev >
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
