From 4da9dea5d66a75af3f06cf5ef09f9925776d5167 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 18 Dec 2024 17:38:04 +0100 Subject: [PATCH] Fix clippy lint about autoderefs --- micronfig/src/envdot.rs | 2 +- micronfig/src/envfiles.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/micronfig/src/envdot.rs b/micronfig/src/envdot.rs index 211ec97..500a0a8 100644 --- a/micronfig/src/envdot.rs +++ b/micronfig/src/envdot.rs @@ -21,7 +21,7 @@ pub fn parse_dotenv

(value: P) -> Option let mut contents: String = String::new(); file.read_to_string(&mut contents) - .expect(&*format!("to be able to read {value:?}")); + .expect(&format!("to be able to read {value:?}")); let mut keys: HashMap = HashMap::new(); diff --git a/micronfig/src/envfiles.rs b/micronfig/src/envfiles.rs index f2d41cc..aa11561 100644 --- a/micronfig/src/envfiles.rs +++ b/micronfig/src/envfiles.rs @@ -13,11 +13,11 @@ pub fn get(key: &OsStr) -> Option { let path = std::path::PathBuf::from(path); let mut file = std::fs::File::open(&path) - .expect(&*format!("to be able to open file at {path:?}")); + .expect(&format!("to be able to open file at {path:?}")); let mut data = String::new(); file.read_to_string(&mut data) - .expect(&*format!("to be able to read from file at {path:?}")); + .expect(&format!("to be able to read from file at {path:?}")); Some(data) }