On 01/10/13 16:13, Oren Ben-Kiki wrote:
This problem is unique to the String trait. All the other traits
(Bool, Pointer, ...) just allow specifying the trait directly without
getting too clever with string slices. So... I cheated and added a
LowerHex instance my types instead of String (which conflicts with
libstd) or Str (which I can't implement). I now print my types with
{:x} (I think of it as "user eXtended format").
I know, this is pretty horrible... what is the "right thing" here?
Using {:s} and keep calling .to_str() everywhere?
There's std::fmt::Default, which corresponds to having no format
specifier (e.g. {} or {:10} or {a}, etc).
Huon
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev