From 5bc94416ad0256eff1ae896a1bd5cf72e98936a5 Mon Sep 17 00:00:00 2001 From: knidarkness Date: Sat, 12 Oct 2019 12:26:25 +0300 Subject: [PATCH] Fixed error with borrowing --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index e042338..601fb2d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -55,7 +55,6 @@ fn main() { let options = build_hyperfine_options(&matches); let export_manager = build_export_manager(&matches); let commands = build_commands(&matches); - let unwrapped_opts = options.unwrap(); let res = match options { Ok(ref opts) => run(&commands, &opts), @@ -64,8 +63,9 @@ fn main() { match res { Ok(timing_results) => { - if unwrapped_opts.output_style != OutputStyleOption::None { write_benchmark_comparison(&timing_results); } - let ans = export_manager.write_results(timing_results, unwrapped_opts.time_unit); + let unwrapped = options.unwrap(); + if unwrapped.output_style != OutputStyleOption::None { write_benchmark_comparison(&timing_results); } + let ans = export_manager.write_results(timing_results, unwrapped.time_unit); if let Err(e) = ans { error(&format!( "The following error occurred while exporting: {}",