From 1cf0ea59f355ac21cb47ba33234d3555033be0e7 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Sat, 13 Aug 2022 16:33:22 +0200 Subject: [PATCH] More refactoring --- src/scanner.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scanner.rs b/src/scanner.rs index 884bac6..4923476 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -99,26 +99,26 @@ pub fn start_scan( target_port: u16, num_threads: u32, ignorelist: Option>, -) -> Vec> { +) -> Vec<(u32, bool)> { // Get the workers println!("Getting workers.."); let scan_workers = get_scan_workers(from, to, target_port, num_threads, ignorelist); - let mut results: Vec> = Vec::new(); + let mut results: Vec<(u32, bool)> = Vec::new(); // Run all the workers println!("Running workers:"); for worker in scan_workers { print!("\t* worker={:?}", worker); - let result = match worker.join() { + let mut result = match worker.join() { Ok(r) => r, Err(e) => panic!("{:?}", e) }; println!(" result={:?}", result); - results.push(result); + results.append(&mut result); } println!("End of scan!");