2
0
Fork 1
mirror of https://github.com/async-rs/async-std.git synced 2025-02-06 04:35:32 +00:00

remove usage of deprecated method

Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This commit is contained in:
Yoshua Wuyts 2020-01-07 14:21:17 +01:00
parent 6d69a3e368
commit dfb0c8124c
No known key found for this signature in database
GPG key ID: 24EA8164F96777ED

View file

@ -1,5 +1,7 @@
use crate::utils::Context;
use std::{error::Error as StdError, fmt, io};
/// Wrap `std::io::Error` with additional message
///
/// Keeps the original error kind and stores the original I/O error as `source`.
@ -9,8 +11,6 @@ impl<T> Context for Result<T, std::io::Error> {
}
}
use std::{error::Error as StdError, fmt, io};
#[derive(Debug)]
pub(crate) struct VerboseError {
source: io::Error,
@ -36,10 +36,6 @@ impl fmt::Display for VerboseError {
}
impl StdError for VerboseError {
fn description(&self) -> &str {
self.source.description()
}
fn source(&self) -> Option<&(dyn StdError + 'static)> {
Some(&self.source)
}