From 12c334a77b897f7b1cb6cff3c56a71ecb89c82af Mon Sep 17 00:00:00 2001 From: Richo Healey Date: Sat, 21 Jun 2014 03:39:03 -0700 Subject: std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`. [breaking-change] --- src/libdebug/fmt.rs | 2 +- src/libdebug/repr.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libdebug') diff --git a/src/libdebug/fmt.rs b/src/libdebug/fmt.rs index 4087cb95271..0b04a07ea88 100644 --- a/src/libdebug/fmt.rs +++ b/src/libdebug/fmt.rs @@ -45,7 +45,7 @@ impl Poly for T { // If we have a specified width for formatting, then we have to make // this allocation of a new string _ => { - let s = repr::repr_to_str(self); + let s = repr::repr_to_string(self); f.pad(s.as_slice()) } } diff --git a/src/libdebug/repr.rs b/src/libdebug/repr.rs index 133353ec3d7..3e541929dbf 100644 --- a/src/libdebug/repr.rs +++ b/src/libdebug/repr.rs @@ -73,7 +73,7 @@ int_repr!(u64, "u64") macro_rules! num_repr(($ty:ident, $suffix:expr) => (impl Repr for $ty { fn write_repr(&self, writer: &mut io::Writer) -> io::IoResult<()> { - let s = self.to_str(); + let s = self.to_string(); writer.write(s.as_bytes()).and_then(|()| { writer.write($suffix) }) @@ -564,7 +564,7 @@ pub fn write_repr(writer: &mut io::Writer, object: &T) -> io::IoResult<()> { } } -pub fn repr_to_str(t: &T) -> String { +pub fn repr_to_string(t: &T) -> String { let mut result = io::MemWriter::new(); write_repr(&mut result as &mut io::Writer, t).unwrap(); String::from_utf8(result.unwrap()).unwrap() -- cgit 1.4.1-3-g733a5