chore: cargo +nightly clippy --fix -Z unstable-options

This commit is contained in:
Alexander Meißner
2021-06-18 15:34:46 +02:00
committed by Michael Vines
parent 3570b00560
commit 6514096a67
177 changed files with 1021 additions and 1021 deletions

View File

@@ -160,7 +160,7 @@ impl GenesisConfig {
}
pub fn load(ledger_path: &Path) -> Result<Self, std::io::Error> {
let filename = Self::genesis_filename(&ledger_path);
let filename = Self::genesis_filename(ledger_path);
let file = OpenOptions::new()
.read(true)
.open(&filename)
@@ -198,7 +198,7 @@ impl GenesisConfig {
std::fs::create_dir_all(&ledger_path)?;
let mut file = File::create(Self::genesis_filename(&ledger_path))?;
let mut file = File::create(Self::genesis_filename(ledger_path))?;
file.write_all(&serialized)
}
@@ -339,8 +339,8 @@ mod tests {
&& account.lamports == 10_000));
let path = &make_tmp_path("genesis_config");
config.write(&path).expect("write");
let loaded_config = GenesisConfig::load(&path).expect("load");
config.write(path).expect("write");
let loaded_config = GenesisConfig::load(path).expect("load");
assert_eq!(config.hash(), loaded_config.hash());
let _ignored = std::fs::remove_file(&path);
}