aboutsummaryrefslogtreecommitdiffstats
path: root/src/servo/parser/html_builder.rs
diff options
context:
space:
mode:
authorMargaret Meyerhofer <mmeyerhofer@mozilla.com>2012-06-12 17:27:53 -0700
committerMargaret Meyerhofer <mmeyerhofer@mozilla.com>2012-06-13 13:57:19 -0700
commit3b1df3668c039e21877b36b4366006832269a187 (patch)
tree46ab5dc30a60a6bbbeee0d7bb552d9a16edfcac9 /src/servo/parser/html_builder.rs
parent9597caf42ba2cbef609399e76c1f6d48d16b58d6 (diff)
downloadservo-3b1df3668c039e21877b36b4366006832269a187.tar.gz
servo-3b1df3668c039e21877b36b4366006832269a187.zip
Removed impilicitly copying value warnings.
Diffstat (limited to 'src/servo/parser/html_builder.rs')
-rw-r--r--src/servo/parser/html_builder.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/servo/parser/html_builder.rs b/src/servo/parser/html_builder.rs
index 9fa87ffb2bf..398b65e8f3b 100644
--- a/src/servo/parser/html_builder.rs
+++ b/src/servo/parser/html_builder.rs
@@ -10,15 +10,15 @@ import parser::token;
import gfx::geom;
import dvec::extensions;
-fn link_up_attribute(scope: dom::node_scope, node: dom::node, key: str,
- value: str) {
+fn link_up_attribute(scope: dom::node_scope, node: dom::node, -key: str,
+ -value: str) {
// TODO: Implement atoms so that we don't always perform string
// comparisons.
scope.rd(node) {
|node_contents|
alt *node_contents.kind {
dom::nk_element(element) {
- element.attrs.push(~attr(key, value));
+ element.attrs.push(~attr(copy key, copy value));
alt *element.subclass {
es_img(img) if key == "width" {
alt int::from_str(value) {
@@ -89,6 +89,7 @@ fn build_dom(scope: dom::node_scope,
cur = scope.get_parent(cur).get();
}
parser::to_text(s) if !s.is_whitespace() {
+ let s <- s;
let new_node = scope.new_node(dom::nk_text(s));
scope.add_child(cur, new_node);
}