Skip to content

Commit 316f227

Browse files
committed
Remove deprecated usage of description()
1 parent aa9e33d commit 316f227

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/hashfilecache.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use std::sync::{Arc, Mutex};
33
use std::path::{Path, PathBuf};
44
use std::io::{self, Read, Write, Seek, SeekFrom, BufReader};
55
use std::fmt::{self, Formatter, Debug};
6-
use std::error::Error;
76
use std::iter::FromIterator;
87

98
use rand::{prelude::*, distributions::Alphanumeric};
@@ -129,7 +128,7 @@ impl FileCachePath {
129128

130129
debug!("Removing staging file {}", source_path.display());
131130
if let Err(err) = fs::remove_file(&source_path) {
132-
warn!("Unable to remove staging file {}: {}", source_path.display(), err.description());
131+
warn!("Unable to remove staging file {}: {}", source_path.display(), err);
133132
}
134133

135134
Ok(())

src/overlay.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use std::hash::{Hash, Hasher};
88
use std::fmt::{self, Formatter, Display, Debug};
99
use std::sync::{Arc, Weak, Mutex};
1010
use std::collections::HashMap;
11-
use std::error::Error as StdError;
1211
use std::ffi::OsStr;
1312
use std::cmp::max;
1413
use std::borrow::Cow;
@@ -833,14 +832,14 @@ impl<C> FilesystemOverlay<C> where C: CacheLayer+Debug+Send+Sync+'static,
833832
if let Err(ioerr) = fs::remove_dir(&*path.abs_fs_path()) {
834833
warn!("Unable to remove overlay directory {} during cleanup: {}",
835834
path.abs_fs_path().display(),
836-
ioerr.description());
835+
ioerr);
837836
}
838837
} else if !self.overlay_files.contains_key(path.overlay_path()) {
839838
debug!("Removing overlay file {}", path.abs_fs_path().display());
840839
if let Err(ioerr) = fs::remove_file(&*path.abs_fs_path()) {
841840
warn!("Unable to remove overlay file {} during cleanup: {}",
842841
path.abs_fs_path().display(),
843-
ioerr.description());
842+
ioerr);
844843
}
845844
}
846845

0 commit comments

Comments
 (0)