mirror of
https://github.com/Steffo99/micronfig.git
synced 2024-12-22 20:14:18 +00:00
Fix clippy lint about autoderefs
This commit is contained in:
parent
3d6ba7f31f
commit
4da9dea5d6
2 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ pub fn parse_dotenv<P>(value: P) -> Option<DotEnv>
|
|||
|
||||
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<OsString, String> = HashMap::new();
|
||||
|
||||
|
|
|
@ -13,11 +13,11 @@ pub fn get(key: &OsStr) -> Option<String> {
|
|||
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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue