diff options
Diffstat (limited to 'components/script/dom/textdecoder.rs')
-rw-r--r-- | components/script/dom/textdecoder.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/textdecoder.rs b/components/script/dom/textdecoder.rs index 899961963c5..c0dcd485c9f 100644 --- a/components/script/dom/textdecoder.rs +++ b/components/script/dom/textdecoder.rs @@ -72,7 +72,7 @@ impl TextDecoder { impl TextDecoderMethods for TextDecoder { // https://encoding.spec.whatwg.org/#dom-textdecoder-encoding fn Encoding(&self) -> DOMString { - DOMString(self.encoding.whatwg_name().unwrap().to_owned()) + DOMString::from(self.encoding.whatwg_name().unwrap()) } // https://encoding.spec.whatwg.org/#dom-textdecoder-fatal |