Skip to content

Commit 8879fa7

Browse files
authored
removed unnecessary .clone()s (#610)
1 parent 5d53235 commit 8879fa7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/input.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,8 @@ impl Opts {
210210

211211
// Only use top ports when the user asks for them
212212
if self.top && config.ports.is_some() {
213-
let mut ports: Vec<u16> = Vec::with_capacity(config.ports.clone().unwrap().len());
214-
for entry in config.ports.clone().unwrap().keys() {
213+
let mut ports: Vec<u16> = Vec::with_capacity(config.ports.as_ref().unwrap().len());
214+
for entry in config.ports.as_ref().unwrap().keys() {
215215
ports.push(entry.parse().unwrap());
216216
}
217217
self.ports = Some(ports);

0 commit comments

Comments
 (0)