error: Add ParseIntError to the possible errors.

This commit is contained in:
Emmanuel Gil Peyrot 2017-04-22 17:39:00 +01:00
parent edc5961a79
commit 000e5a50c2

View file

@ -1,5 +1,6 @@
use std::convert::From; use std::convert::From;
use std::io; use std::io;
use std::num;
use base64; use base64;
use minidom; use minidom;
@ -10,6 +11,7 @@ pub enum Error {
IoError(io::Error), IoError(io::Error),
XMLError(minidom::Error), XMLError(minidom::Error),
Base64Error(base64::Base64Error), Base64Error(base64::Base64Error),
ParseIntError(num::ParseIntError),
} }
impl From<io::Error> for Error { impl From<io::Error> for Error {
@ -29,3 +31,9 @@ impl From<base64::Base64Error> for Error {
Error::Base64Error(err) Error::Base64Error(err)
} }
} }
impl From<num::ParseIntError> for Error {
fn from(err: num::ParseIntError) -> Error {
Error::ParseIntError(err)
}
}