From 721405f8093f08cd20c8e960bb6dd193563167d9 Mon Sep 17 00:00:00 2001 From: Pavel Mikhalkevich Date: Fri, 1 Dec 2023 16:39:38 +0500 Subject: [PATCH] Fix parsing number of jobs and threads --- src/bin/loadtest.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/bin/loadtest.rs b/src/bin/loadtest.rs index 331ae481..a1723538 100644 --- a/src/bin/loadtest.rs +++ b/src/bin/loadtest.rs @@ -27,11 +27,15 @@ fn main() { ) .get_matches(); - let jobs = *matches - .get_one::("jobs") + let jobs = matches + .get_one::("jobs") + .unwrap() + .parse::() .expect("Number of jobs to run"); - let threads = *matches - .get_one::("threads") + let threads = matches + .get_one::("threads") + .unwrap() + .parse::() .expect("Number of consumers/producers to run"); println!( "Running loadtest with {} jobs and {} threads",