mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Refactor Error enum usage to consistently be qualified
This commit is contained in:
parent
94816bb3b4
commit
ba86131cd5
19 changed files with 139 additions and 161 deletions
|
@ -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()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue