diff --git a/src/error.rs b/src/error.rs index c55a52a1..e9506bae 100644 --- a/src/error.rs +++ b/src/error.rs @@ -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 for Error { @@ -29,3 +31,9 @@ impl From for Error { Error::Base64Error(err) } } + +impl From for Error { + fn from(err: num::ParseIntError) -> Error { + Error::ParseIntError(err) + } +}