From 96841aa4f9771a7c5f9b798a75a7cd6765abfe09 Mon Sep 17 00:00:00 2001 From: Colin Swenson-Healey Date: Mon, 25 Mar 2024 15:07:03 -0700 Subject: [PATCH] refactor: reduce complexity --- src/util/regulation.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/util/regulation.rs b/src/util/regulation.rs index 26aa3e0..42d99c7 100644 --- a/src/util/regulation.rs +++ b/src/util/regulation.rs @@ -87,7 +87,6 @@ impl Regulation { let mut params: HashMap> = HashMap::new(); for file in &res.files { - let path = PathBuf::from_str(&file.name).unwrap(); let file_name = path.file_stem().unwrap().to_str().unwrap().split("\\").last().expect("Could not find content at end of path"); let param_type = Param::from_str(file_name)?; params.insert(param_type, file.bytes.to_vec());