mirror of
https://github.com/servo/servo.git
synced 2025-06-25 01:24:37 +01:00
Trait changes, and eliminate 'copy'
This commit is contained in:
parent
907d9f23cf
commit
ffe60ea027
30 changed files with 111 additions and 100 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue