summaryrefslogtreecommitdiff
path: root/src/spec.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-08-06 09:41:02 +0300
committerLars Wirzenius <liw@liw.fi>2021-08-06 09:41:02 +0300
commit6fc3ad8a6758bb6c764ba208d814c1ab82d764ac (patch)
treec7871da86dbb89792af674aeb336a830fe3d7005 /src/spec.rs
parente403fab2890cf33fc70bc9becf5e7fd6523008e5 (diff)
downloadvmadm-6fc3ad8a6758bb6c764ba208d814c1ab82d764ac.tar.gz
chore: fix small problems found by clippy
Sponsored-by: author
Diffstat (limited to 'src/spec.rs')
-rw-r--r--src/spec.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/spec.rs b/src/spec.rs
index c3c6b59..9f8d3e8 100644
--- a/src/spec.rs
+++ b/src/spec.rs
@@ -68,7 +68,7 @@ impl OneVmInputSpecification {
get(
&self.image,
- &default_image,
+ default_image,
SpecificationError::NoImage(name.to_string()),
)
}
@@ -268,7 +268,7 @@ impl Specification {
let mut machines = vec![];
for (name, machine) in input.iter() {
- let spec = Specification::one_machine(config, &name, &machine)?;
+ let spec = Specification::one_machine(config, name, machine)?;
debug!("machine with defaults applied: {:#?}", spec);
machines.push(spec);
}
@@ -330,7 +330,7 @@ fn ssh_keys(filenames: &[PathBuf]) -> Result<Vec<String>, SpecificationError> {
let key =
std::fs::read(&filename).map_err(|e| SpecificationError::SshKeyRead(filename, e))?;
let key = String::from_utf8(key)?;
- let key = key.strip_suffix("\n").or(Some(&key)).unwrap();
+ let key = key.strip_suffix('\n').or(Some(&key)).unwrap();
keys.push(key.to_string());
}
Ok(keys)