Perhaps this was an oversight as the code base has developed
organically. But in case it was intentional, I just wanted to check.
libstd/to_str.rs defines each of the following impls
impl<'self,A:ToStr> ToStr for &'self [A]
impl<A:ToStr> ToStr for ~[A]
impl<A:ToStr> ToStr for @[A]
whereas only the first one seems to be needed to cover all array
cases. To test this, I defined an equivalent MyToStr trait, defining
only the implementation for &'self [A], and it seemed to work for all
the array types. So just to check: is there any particular reason one
would want to define all three with identical implementation?
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev