mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
Add the comment to explain the dual declaration.
This commit is contained in:
parent
fd0dadbddf
commit
31e2f22d20
1 changed files with 2 additions and 0 deletions
|
@ -219,6 +219,8 @@ impl Element {
|
||||||
self.style_attribute = Some(style::parse_style_attribute(value))
|
self.style_attribute = Some(style::parse_style_attribute(value))
|
||||||
}
|
}
|
||||||
"id" => {
|
"id" => {
|
||||||
|
// XXX: this dual declaration are workaround to avoid the compile error:
|
||||||
|
// "borrowed value does not live long enough"
|
||||||
let doc = self.node.owner_doc();
|
let doc = self.node.owner_doc();
|
||||||
let doc = doc.mut_document();
|
let doc = doc.mut_document();
|
||||||
doc.update_idmap(abstract_self, Some(value.clone()), old_value);
|
doc.update_idmap(abstract_self, Some(value.clone()), old_value);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue