Skip to content

Commit

Permalink
get rid of and_then in innerHTML setter
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisParis committed Apr 6, 2015
1 parent cc771fd commit 3542360
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/script/dom/element.rs
Expand Up @@ -1176,9 +1176,9 @@ impl<'a> ElementMethods for JSRef<'a, Element> {
// with the new value as markup, and the context object as the context element.
// 2. Replace all with fragment within the context object.
let context_node: JSRef<Node> = NodeCast::from_ref(self);
context_node.parse_fragment(value)
.and_then(|frag| Ok(Node::replace_all(Some(NodeCast::from_ref(frag.root().r())),
context_node)))
let frag = try!(context_node.parse_fragment(value));
Node::replace_all(Some(NodeCast::from_ref(frag.root().r())), context_node);
Ok(())
}

fn GetOuterHTML(self) -> Fallible<DOMString> {
Expand Down

0 comments on commit 3542360

Please sign in to comment.