1
Fork 0

impl Clone for ~T, ~[T], ~str

This commit is contained in:
Ben Striegel 2013-03-15 18:26:59 -04:00
parent 2b059c6e56
commit 748c2c9ebc
7 changed files with 51 additions and 25 deletions

View file

@ -20,6 +20,7 @@
use at_vec;
use cast;
use char;
use clone::Clone;
use cmp::{Equiv, TotalOrd, Ordering, Less, Equal, Greater};
use libc;
use option::{None, Option, Some};
@ -2433,6 +2434,13 @@ impl OwnedStr for ~str {
}
}
impl Clone for ~str {
#[inline(always)]
fn clone(&self) -> ~str {
self.to_str() // hilarious
}
}
#[cfg(test)]
mod tests {
use char;