diff options
author | Anthony Urena <anthgur@users.noreply.github.com> | 2015-10-06 05:43:52 -0400 |
---|---|---|
committer | Anthony Urena <anthgur@users.noreply.github.com> | 2015-10-06 05:43:52 -0400 |
commit | ba86131cd5a7be41ca3adf5805c096d2756c9276 (patch) | |
tree | b6cd23560f1027f8d1b333ba0ab07c22b8005731 /components/script/dom/textencoder.rs | |
parent | 94816bb3b42e50127db56e64086843b14614ca88 (diff) | |
download | servo-ba86131cd5a7be41ca3adf5805c096d2756c9276.tar.gz servo-ba86131cd5a7be41ca3adf5805c096d2756c9276.zip |
Refactor Error enum usage to consistently be qualified
Diffstat (limited to 'components/script/dom/textencoder.rs')
-rw-r--r-- | components/script/dom/textencoder.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/script/dom/textencoder.rs b/components/script/dom/textencoder.rs index 17d5e0aeb60..913b7c4fe86 100644 --- a/components/script/dom/textencoder.rs +++ b/components/script/dom/textencoder.rs @@ -4,8 +4,7 @@ use dom::bindings::codegen::Bindings::TextEncoderBinding; use dom::bindings::codegen::Bindings::TextEncoderBinding::TextEncoderMethods; -use dom::bindings::error::Error::Range; -use dom::bindings::error::Fallible; +use dom::bindings::error::{Error, Fallible}; use dom::bindings::global::GlobalRef; use dom::bindings::js::Root; use dom::bindings::str::USVString; @@ -50,7 +49,7 @@ impl TextEncoder { Some(enc) => enc, None => { debug!("Encoding Label Not Supported"); - return Err(Range("The given encoding is not supported.".to_owned())) + return Err(Error::Range("The given encoding is not supported.".to_owned())) } }; @@ -60,7 +59,7 @@ impl TextEncoder { } _ => { debug!("Encoding Not UTF"); - Err(Range("The encoding must be utf-8, utf-16le, or utf-16be.".to_owned())) + Err(Error::Range("The encoding must be utf-8, utf-16le, or utf-16be.".to_owned())) } } } |