Refactor Error enum usage to consistently be qualified

This commit is contained in:
Anthony Urena 2015-10-06 05:43:52 -04:00
parent 94816bb3b4
commit ba86131cd5
19 changed files with 139 additions and 161 deletions

View file

@ -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()))
}
}
}