Switched over substr and trim functions in str to be non-allocating, temporary renamed them to better track use-sites

This commit is contained in:
Marvin Löbel
2013-03-21 22:59:33 +01:00
parent ed25a674ac
commit ee2f3d9673
18 changed files with 130 additions and 124 deletions

View File

@@ -28,18 +28,6 @@ impl ToStr for () {
#[inline(always)]
pure fn to_str(&self) -> ~str { ~"()" }
}
impl ToStr for ~str {
#[inline(always)]
pure fn to_str(&self) -> ~str { copy *self }
}
impl ToStr for &'self str {
#[inline(always)]
pure fn to_str(&self) -> ~str { ::str::from_slice(*self) }
}
impl ToStr for @str {
#[inline(always)]
pure fn to_str(&self) -> ~str { ::str::from_slice(*self) }
}
// FIXME #4898: impl for one-tuples