tree wide: clippy lint fixes

most (not all) where done automatically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2022-06-02 15:59:53 +02:00
parent c39852abdc
commit fbfb64a6b2
21 changed files with 34 additions and 46 deletions

View File

@ -35,7 +35,7 @@ pub fn lock_config() -> Result<BackupLockGuard, Error> {
pub fn config() -> Result<(SectionConfigData, [u8; 32]), Error> {
let content = proxmox_sys::fs::file_read_optional_string(PRUNE_CFG_FILENAME)?;
let content = content.unwrap_or_else(String::new);
let content = content.unwrap_or_default();
let digest = openssl::sha::sha256(content.as_bytes());
let data = CONFIG.parse(PRUNE_CFG_FILENAME, &content)?;