lib: Import base64 at the top-level, and not in a module.
This commit is contained in:
parent
8fba5cf966
commit
6ba22a43e5
3 changed files with 11 additions and 2 deletions
10
src/error.rs
10
src/error.rs
|
|
@ -1,13 +1,15 @@
|
|||
use std::convert::From;
|
||||
use std::io;
|
||||
|
||||
use base64;
|
||||
use minidom;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Error {
|
||||
ParseError(&'static str),
|
||||
IoError(io::Error),
|
||||
XMLError(minidom::Error),
|
||||
ParseError(&'static str),
|
||||
Base64Error(base64::Base64Error),
|
||||
}
|
||||
|
||||
impl From<io::Error> for Error {
|
||||
|
|
@ -21,3 +23,9 @@ impl From<minidom::Error> for Error {
|
|||
Error::XMLError(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<base64::Base64Error> for Error {
|
||||
fn from(err: base64::Base64Error) -> Error {
|
||||
Error::Base64Error(err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue