diff --git a/src/libstd/to_str.rs b/src/libstd/to_str.rs index d15c0a31f5f..bfda92d46a2 100644 --- a/src/libstd/to_str.rs +++ b/src/libstd/to_str.rs @@ -44,7 +44,7 @@ impl ToStr for (A,) { fn to_str(&self) -> ~str { match *self { (ref a,) => { - ~"(" + a.to_str() + ",)" + fmt!("(%s,)", (*a).to_str()) } } } @@ -95,7 +95,7 @@ impl ToStr for (A, B) { //let &(ref a, ref b) = self; match *self { (ref a, ref b) => { - ~"(" + a.to_str() + ", " + b.to_str() + ")" + fmt!("(%s, %s)", (*a).to_str(), (*b).to_str()) } } }