From f383796220835e16e51b4c6df0e739c822a39ae3 Mon Sep 17 00:00:00 2001 From: Toni Peter Date: Tue, 26 Nov 2024 10:54:44 +0100 Subject: [PATCH] Fix clippy lints --- rust/src/nasl/builtin/network/socket.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/src/nasl/builtin/network/socket.rs b/rust/src/nasl/builtin/network/socket.rs index f1387d35f..e9305e3e1 100644 --- a/rust/src/nasl/builtin/network/socket.rs +++ b/rust/src/nasl/builtin/network/socket.rs @@ -432,7 +432,7 @@ impl NaslSockets { // TODO: set timeout to global recv timeout * 2 when available let timeout = convert_timeout(timeout).unwrap_or(Duration::from_secs(10)); // TODO: for every vhost - let vhosts = vec!["localhost"]; + let vhosts = ["localhost"]; let sockets: Vec> = vhosts .iter() .map(|vhost| { @@ -443,7 +443,7 @@ impl NaslSockets { Ok(NaslValue::Fork( sockets .into_iter() - .filter_map(|socket| socket) + .flatten() .map(|socket| { let fd = self.add(socket); NaslValue::Number(fd as i64)