error: Add ParseIntError to the possible errors.
This commit is contained in:
parent
edc5961a79
commit
000e5a50c2
1 changed files with 8 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
use std::convert::From;
|
||||
use std::io;
|
||||
use std::num;
|
||||
|
||||
use base64;
|
||||
use minidom;
|
||||
|
@ -10,6 +11,7 @@ pub enum Error {
|
|||
IoError(io::Error),
|
||||
XMLError(minidom::Error),
|
||||
Base64Error(base64::Base64Error),
|
||||
ParseIntError(num::ParseIntError),
|
||||
}
|
||||
|
||||
impl From<io::Error> for Error {
|
||||
|
@ -29,3 +31,9 @@ impl From<base64::Base64Error> for Error {
|
|||
Error::Base64Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<num::ParseIntError> for Error {
|
||||
fn from(err: num::ParseIntError) -> Error {
|
||||
Error::ParseIntError(err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue