Skip to content

Commit 133a4b3

Browse files
committed
initialize errors HashSet without high initial capacity
fixes: - #447 - #523
1 parent 0f65753 commit 133a4b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/scanner/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl Scanner {
6262
let mut socket_iterator: SocketIterator = SocketIterator::new(&self.ips, &ports);
6363
let mut open_sockets: Vec<SocketAddr> = Vec::new();
6464
let mut ftrs = FuturesUnordered::new();
65-
let mut errors: HashSet<String> = HashSet::with_capacity(self.ips.len() * 1000);
65+
let mut errors: HashSet<String> = HashSet::new();
6666

6767
for _ in 0..self.batch_size {
6868
if let Some(socket) = socket_iterator.next() {

0 commit comments

Comments
 (0)