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

@ -28,8 +28,8 @@ pub fn spawn_css_parser(provenance: StylesheetProvenance,
do task::spawn {
let url = do provenance_cell.with_ref |p| {
match *p {
UrlProvenance(ref the_url) => copy *the_url,
InlineProvenance(ref the_url, _) => copy *the_url
UrlProvenance(ref the_url) => (*the_url).clone(),
InlineProvenance(ref the_url, _) => (*the_url).clone()
}
};

View file

@ -185,7 +185,7 @@ fn js_script_listener(to_parent: SharedChan<HtmlDiscoveryMessage>,
do task::spawn {
let (input_port, input_chan) = comm::stream();
// TODO: change copy to move once we can move into closures
resource_task.send(Load(copy url, input_chan));
resource_task.send(Load(url.clone(), input_chan));
let mut buf = ~[];
loop {
@ -403,7 +403,7 @@ pub fn parse_html(cx: *JSContext,
None => {}
Some(src) => {
let img_url = make_url(src, Some(url2.clone()));
image_element.image = Some(copy img_url);
image_element.image = Some(img_url.clone());
// inform the image cache to load this, but don't store a handle.
// TODO (Issue #84): don't prefetch if we are within a <noscript>
// tag.