mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
error: replace cause method with source
cause method for std::error::Error is depricated by rust, source method is recommended. Fixes: #107 Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
This commit is contained in:
@@ -85,7 +85,7 @@ impl fmt::Display for Error {
|
||||
}
|
||||
|
||||
impl StdError for Error {
|
||||
fn cause(&self) -> Option<&dyn StdError> {
|
||||
fn source(&self) -> Option<&(dyn StdError + 'static)> {
|
||||
#[allow(clippy::manual_map)]
|
||||
match self.cause {
|
||||
Some(ref x) => Some(&**x),
|
||||
|
||||
Reference in New Issue
Block a user