From 8c5ab8e72dc62e803005db1b1ed4da0a3da617ee Mon Sep 17 00:00:00 2001 From: Tom Bland Date: Tue, 5 Aug 2025 10:16:19 +0100 Subject: [PATCH] Apply pre-commit --- src/optimisation.rs | 4 ++-- src/settings.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/optimisation.rs b/src/optimisation.rs index addefd7..0e325f6 100644 --- a/src/optimisation.rs +++ b/src/optimisation.rs @@ -13,6 +13,6 @@ pub fn run(settings_file_path: &Path) { // Calculate solution let solution = solve_highs(&definitions, &constraints, Sense::Maximise) - .unwrap_or_else(|err| panic!("Failed to calculate a solution: {:?}", err)); - println!("Calculated solution: {:?}", solution); + .unwrap_or_else(|err| panic!("Failed to calculate a solution: {err:?}")); + println!("Calculated solution: {solution:?}"); } diff --git a/src/settings.rs b/src/settings.rs index dee685a..82eb3e0 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -26,9 +26,9 @@ struct InputFiles { /// Read a settings file from the given path. fn read_settings_file(path: &Path) -> Settings { let config_str = fs::read_to_string(path) - .unwrap_or_else(|err| panic!("Failed to read file {:?}: {:?}", path, err)); + .unwrap_or_else(|err| panic!("Failed to read file {path:?}: {err:?}")); toml::from_str(&config_str) - .unwrap_or_else(|err| panic!("Could not parse settings file: {:?}", err)) + .unwrap_or_else(|err| panic!("Could not parse settings file: {err:?}")) } /// Read settings from disk.