diff options
| author | bors <bors@rust-lang.org> | 2013-06-06 09:13:44 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-06-06 09:13:44 -0700 |
| commit | 021e6d38f0d04b5d644033527d97990db977717e (patch) | |
| tree | eae8a3a19d8aa3cd9d966759fde88ea001753678 /src/libstd | |
| parent | 8450dc8f5e7616617d707f8fdbfaf7ad6ad5aa41 (diff) | |
| parent | 01c4f11cf82f0b4cf5468f2e41d2ef9e351b7a08 (diff) | |
| download | rust-021e6d38f0d04b5d644033527d97990db977717e.tar.gz rust-021e6d38f0d04b5d644033527d97990db977717e.zip | |
auto merge of #6975 : artagnon/rust/tuple-tostr, r=bstrie
[1/2] fixes a couple of comments. [2/2] uses fmt! instead of hand-concatenating strings in a couple of places. No functional changes.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/to_str.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libstd/to_str.rs b/src/libstd/to_str.rs index 3cc64147964..bfda92d46a2 100644 --- a/src/libstd/to_str.rs +++ b/src/libstd/to_str.rs @@ -44,7 +44,7 @@ impl<A:ToStr> ToStr for (A,) { fn to_str(&self) -> ~str { match *self { (ref a,) => { - ~"(" + a.to_str() + ",)" + fmt!("(%s,)", (*a).to_str()) } } } @@ -91,11 +91,11 @@ impl<A:ToStr+Hash+Eq> ToStr for HashSet<A> { impl<A:ToStr,B:ToStr> ToStr for (A, B) { #[inline(always)] fn to_str(&self) -> ~str { - // FIXME(#4760): this causes an llvm assertion + // FIXME(#4653): this causes an llvm assertion //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()) } } } @@ -104,7 +104,7 @@ impl<A:ToStr,B:ToStr> ToStr for (A, B) { impl<A:ToStr,B:ToStr,C:ToStr> ToStr for (A, B, C) { #[inline(always)] fn to_str(&self) -> ~str { - // FIXME(#4760): this causes an llvm assertion + // FIXME(#4653): this causes an llvm assertion //let &(ref a, ref b, ref c) = self; match *self { (ref a, ref b, ref c) => { |
