mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Eliminate some copies
This commit is contained in:
parent
3cf9b0f2b0
commit
a48026a838
1 changed files with 3 additions and 3 deletions
|
@ -191,15 +191,15 @@ pub fn parse_html(scope: NodeScope,
|
||||||
let append_hook: @fn(Node, Node) = |parent_node, child_node| {
|
let append_hook: @fn(Node, Node) = |parent_node, child_node| {
|
||||||
do scope.read(&parent_node) |parent_node_contents| {
|
do scope.read(&parent_node) |parent_node_contents| {
|
||||||
do scope.read(&child_node) |child_node_contents| {
|
do scope.read(&child_node) |child_node_contents| {
|
||||||
match (parent_node_contents.kind, child_node_contents.kind) {
|
match (&parent_node_contents.kind, &child_node_contents.kind) {
|
||||||
(~Element(ref element), ~Text(ref data)) => {
|
(&~Element(ref element), &~Text(ref data)) => {
|
||||||
match element.kind {
|
match element.kind {
|
||||||
~HTMLStyleElement => {
|
~HTMLStyleElement => {
|
||||||
debug!("found inline CSS stylesheet");
|
debug!("found inline CSS stylesheet");
|
||||||
let url = url::from_str("http://example.com/"); // FIXME
|
let url = url::from_str("http://example.com/"); // FIXME
|
||||||
let provenance = InlineProvenance(result::unwrap(move url),
|
let provenance = InlineProvenance(result::unwrap(move url),
|
||||||
copy *data);
|
copy *data);
|
||||||
css_chan.send(CSSTaskNewFile(provenance));
|
css_chan.send(CSSTaskNewFile(move provenance));
|
||||||
}
|
}
|
||||||
_ => {} // Nothing to do.
|
_ => {} // Nothing to do.
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue