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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user