Trait changes, and eliminate 'copy'

This commit is contained in:
Keegan McAllister 2013-08-09 13:41:10 -07:00
parent 907d9f23cf
commit ffe60ea027
30 changed files with 111 additions and 100 deletions

View file

@ -44,7 +44,7 @@ pub fn make_url(str_url: ~str, current_url: Option<Url>) -> Url {
path.push(p.to_str());
}
let path = path.init();
let mut path = path.iter().transform(|x| copy *x).collect::<~[~str]>();
let mut path = path.iter().transform(|x| (*x).clone()).collect::<~[~str]>();
path.push(str_url);
let path = path.connect("/");
@ -118,6 +118,6 @@ mod make_url_tests {
pub type UrlMap<T> = @mut HashMap<Url, T>;
pub fn url_map<T: Copy>() -> UrlMap<T> {
pub fn url_map<T: Clone + 'static>() -> UrlMap<T> {
@mut HashMap::new()
}