cleanup: reduce compiler warnings
This commit is contained in:
parent
991de6007b
commit
a198d74fc0
|
@ -156,7 +156,7 @@ impl ChunkStore {
|
|||
const UTIME_NOW: i64 = ((1 << 30) - 1);
|
||||
const UTIME_OMIT: i64 = ((1 << 30) - 2);
|
||||
|
||||
let mut times: [libc::timespec; 2] = [
|
||||
let times: [libc::timespec; 2] = [
|
||||
libc::timespec { tv_sec: 0, tv_nsec: UTIME_NOW },
|
||||
libc::timespec { tv_sec: 0, tv_nsec: UTIME_OMIT }
|
||||
];
|
||||
|
@ -231,7 +231,7 @@ impl ChunkStore {
|
|||
|
||||
for i in 0..256 {
|
||||
let l1name = PathBuf::from(format!("{:02x}", i));
|
||||
let mut l1_handle = match nix::dir::Dir::openat(
|
||||
let l1_handle = match nix::dir::Dir::openat(
|
||||
base_fd, &l1name, OFlag::O_RDONLY, Mode::empty()) {
|
||||
Ok(h) => h,
|
||||
Err(err) => bail!("unable to open store '{}' dir {:?}/{:?} - {}",
|
||||
|
|
|
@ -32,7 +32,7 @@ impl DataStore {
|
|||
|
||||
if let Some(datastore) = map.get(name) {
|
||||
// Compare Config - if changed, create new Datastore object!
|
||||
if (datastore.chunk_store.base == PathBuf::from(path)) {
|
||||
if datastore.chunk_store.base == PathBuf::from(path) {
|
||||
return Ok(datastore.clone());
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ impl DataStore {
|
|||
|
||||
pub fn garbage_collection(&self) -> Result<(), Error> {
|
||||
|
||||
if let Ok(ref mut mutex) = self.gc_mutex.try_lock() {
|
||||
if let Ok(ref mut _mutex) = self.gc_mutex.try_lock() {
|
||||
|
||||
let mut gc_status = GarbageCollectionStatus::default();
|
||||
gc_status.used_bytes = 0;
|
||||
|
|
Loading…
Reference in New Issue