From 3542360d001e91e073c387a73b1c6566a4ddff7f Mon Sep 17 00:00:00 2001 From: Chris Paris Date: Thu, 26 Mar 2015 13:06:33 -1000 Subject: [PATCH] get rid of and_then in innerHTML setter --- components/script/dom/element.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index 0aa5f9327b4..63ccf21bdde 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -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 = 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 {