Fix warnings: unused

This commit is contained in:
adria0
2020-07-29 10:57:15 +02:00
committed by Artem Vorotnikov
parent 0cd972326c
commit cacbf256fe
23 changed files with 21 additions and 55 deletions

View File

@@ -72,7 +72,6 @@ pub fn find_unique_filename_using_random_suffix(
/// Create a new file and restrict permissions to owner only. It errors if the file already exists.
#[cfg(unix)]
pub fn create_new_file_with_permissions_to_owner(file_path: &Path) -> io::Result<fs::File> {
use libc;
use std::os::unix::fs::OpenOptionsExt;
fs::OpenOptions::new()
@@ -94,7 +93,6 @@ pub fn create_new_file_with_permissions_to_owner(file_path: &Path) -> io::Result
/// Create a new file and restrict permissions to owner only. It replaces the existing file if it already exists.
#[cfg(unix)]
pub fn replace_file_with_permissions_to_owner(file_path: &Path) -> io::Result<fs::File> {
use libc;
use std::os::unix::fs::PermissionsExt;
let file = fs::File::create(file_path)?;

View File

@@ -17,7 +17,6 @@
use parking_lot::{Mutex, RwLock};
use std::{
collections::{BTreeMap, HashMap},
mem,
num::NonZeroU32,
path::PathBuf,
time::{Duration, Instant},
@@ -454,7 +453,7 @@ impl EthMultiStore {
}
}
mem::replace(&mut *cache, new_accounts);
*cache = new_accounts;
Ok(())
}