]> git.lizzy.rs Git - rust.git/commitdiff
Fix deprecated Error.description() usage in docs
authorMarti Raudsepp <marti@juffo.org>
Sat, 21 Mar 2020 10:33:52 +0000 (12:33 +0200)
committerMarti Raudsepp <marti@juffo.org>
Sat, 21 Mar 2020 10:33:52 +0000 (12:33 +0200)
src/libstd/error.rs

index 2a370f192964f8b5ae0841abfc6006128024abe8..b394f2efc2e35cfa5ee1b309f035b3dec343368c 100644 (file)
@@ -88,7 +88,7 @@ pub trait Error: Debug + Display {
     /// fn main() {
     ///     match get_super_error() {
     ///         Err(e) => {
-    ///             println!("Error: {}", e.description());
+    ///             println!("Error: {}", e);
     ///             println!("Caused by: {}", e.source().unwrap());
     ///         }
     ///         _ => println!("No error"),