From 0f12de03882156d27631c82063bdf1be464254b9 Mon Sep 17 00:00:00 2001 From: Mathijs van de Nes Date: Thu, 19 Mar 2015 14:32:49 +0100 Subject: [PATCH] Silence deprecation warnings by casting --- src/result.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/result.rs b/src/result.rs index 69c9ce7b..d9aff241 100644 --- a/src/result.rs +++ b/src/result.rs @@ -34,7 +34,7 @@ impl ZipError match *self { ZipError::Io(ref io_err) => { - ("Io Error: ".to_string() + io_err.description()).into_cow() + ("Io Error: ".to_string() + (io_err as &error::Error).description()).into_cow() }, ZipError::InvalidArchive(msg) | ZipError::UnsupportedArchive(msg) => { (self.description().to_string() + ": " + msg).into_cow() @@ -68,7 +68,7 @@ impl error::Error for ZipError { match *self { - ZipError::Io(ref io_err) => io_err.description(), + ZipError::Io(ref io_err) => (io_err as &error::Error).description(), ZipError::InvalidArchive(..) => "Invalid Zip archive", ZipError::UnsupportedArchive(..) => "Unsupported Zip archive", ZipError::FileNotFound => "Specified file not found in archive",