From 000e5a50c29d365d1defa5fc765fd1f97007a88a Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 22 Apr 2017 17:39:00 +0100 Subject: [PATCH] error: Add ParseIntError to the possible errors. --- src/error.rs | 8 ++++++++ 1 file changed, 8 insertions(+) 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) + } +}