diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-08-06 09:41:02 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-08-06 09:41:02 +0300 |
commit | 6fc3ad8a6758bb6c764ba208d814c1ab82d764ac (patch) | |
tree | c7871da86dbb89792af674aeb336a830fe3d7005 /src/cloudinit.rs | |
parent | e403fab2890cf33fc70bc9becf5e7fd6523008e5 (diff) | |
download | vmadm-6fc3ad8a6758bb6c764ba208d814c1ab82d764ac.tar.gz |
chore: fix small problems found by clippy
Sponsored-by: author
Diffstat (limited to 'src/cloudinit.rs')
-rw-r--r-- | src/cloudinit.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cloudinit.rs b/src/cloudinit.rs index 88d1dcf..4fdf9d1 100644 --- a/src/cloudinit.rs +++ b/src/cloudinit.rs @@ -161,7 +161,7 @@ impl Metadata { fn cleanup_document(doc: &str) -> String { let doc = doc.strip_prefix("---\n").or(Some(doc)).unwrap(); - let doc = doc.strip_suffix("\n").or(Some(doc)).unwrap(); + let doc = doc.strip_suffix('\n').or(Some(doc)).unwrap(); doc.to_string() } @@ -256,7 +256,7 @@ impl Hostkeys { } if let Some(filename) = &spec.ca_key { debug!("Generating host key and certificate"); - let ca = CaKey::from_file(&filename)?; + let ca = CaKey::from_file(filename)?; let pair = KeyPair::generate(KeyKind::Ed25519)?; let cert = ca.certify_host(&pair, &spec.name)?; debug!("generated Ed25519 host certificate {:?}", cert); |