From 55bb999c2cc32749ecb965cd4ce0ed69a7169192 Mon Sep 17 00:00:00 2001 From: est31 Date: Tue, 17 Mar 2020 20:57:20 +0100 Subject: [PATCH] Remove deprecated Error::description Error descriptions are soft-deprecated since 1.27.0, and hard-deprecated since 1.42.0. MSRV is 1.36.0 so well above the 1.27.0 bound. See also https://github.com/rust-lang/rust/pull/66919 --- src/error.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/error.rs b/src/error.rs index a24c04609..c66d10eb1 100644 --- a/src/error.rs +++ b/src/error.rs @@ -90,7 +90,7 @@ impl From for GameError { impl From for GameError { fn from(e: toml::de::Error) -> GameError { - let errstr = format!("TOML decode error: {}", e.description()); + let errstr = format!("TOML decode error: {}", e); GameError::ConfigError(errstr) } @@ -98,14 +98,14 @@ impl From for GameError { impl From for GameError { fn from(e: toml::ser::Error) -> GameError { - let errstr = format!("TOML error (possibly encoding?): {}", e.description()); + let errstr = format!("TOML error (possibly encoding?): {}", e); GameError::ConfigError(errstr) } } impl From for GameError { fn from(e: zip::result::ZipError) -> GameError { - let errstr = format!("Zip error: {}", e.description()); + let errstr = format!("Zip error: {}", e); GameError::ResourceLoadError(errstr) } } @@ -119,7 +119,7 @@ impl From for GameError { impl From for GameError { fn from(e: image::ImageError) -> GameError { - let errstr = format!("Image load error: {}", e.description()); + let errstr = format!("Image load error: {}", e); GameError::ResourceLoadError(errstr) } } @@ -156,7 +156,7 @@ where impl From for GameError { fn from(e: gfx::CombinedError) -> GameError { - let errstr = format!("Texture+view load error: {}", e.description()); + let errstr = format!("Texture+view load error: {}", e); GameError::VideoError(errstr) } }