Skip to content

Commit cfb0132

Browse files
author
Andrew
committed
clippy fix
1 parent 3aaee80 commit cfb0132

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

dsc_lib/src/discovery/command_discovery.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -575,11 +575,7 @@ fn load_adapted_resources_lookup_table() -> HashMap<String, String>
575575
let file_path = get_lookup_table_file_path();
576576

577577
let lookup_table: HashMap<String, String> = match fs::read(file_path.clone()){
578-
Ok(data) => { match serde_json::from_slice(&data) {
579-
Ok(lt) => { lt },
580-
Err(_) => { HashMap::new() }
581-
}
582-
},
578+
Ok(data) => { serde_json::from_slice(&data).unwrap_or_default() },
583579
Err(_) => { HashMap::new() }
584580
};
585581

0 commit comments

Comments
 (0)