@@ -142,11 +142,11 @@ fn main() {
142142
143143 let mut script_bench = NamedTimer :: start ( "Scripts" ) ;
144144
145- print_summary ( open_ports_per_ip, & scripts_to_run, & opts) ;
145+ print_summary ( & open_ports_per_ip, & scripts_to_run, & opts) ;
146146 // We only print closed ports if the user requested it.
147147 if opts. closed {
148148 println ! ( "closed ports:" ) ;
149- print_summary ( closed_ports_per_ip, & scripts_to_run, & opts) ;
149+ print_summary ( & closed_ports_per_ip, & scripts_to_run, & opts) ;
150150 }
151151
152152 // To use the runtime benchmark, run the process as: RUST_LOG=info ./rustscan
@@ -159,11 +159,11 @@ fn main() {
159159}
160160
161161fn print_summary (
162- ports_per_ip : HashMap < IpAddr , Vec < u16 > > ,
163- scripts_to_run : & Vec < ScriptFile > ,
162+ ports_per_ip : & HashMap < IpAddr , Vec < u16 > > ,
163+ scripts_to_run : & [ ScriptFile ] ,
164164 opts : & Opts ,
165165) {
166- for ( ip, ports) in & ports_per_ip {
166+ for ( ip, ports) in ports_per_ip {
167167 let vec_str_ports: Vec < String > = ports. iter ( ) . map ( ToString :: to_string) . collect ( ) ;
168168
169169 // nmap port style is 80,443. Comma separated with no spaces.
@@ -177,7 +177,7 @@ fn print_summary(
177177 detail ! ( "Starting Script(s)" , opts. greppable, opts. accessible) ;
178178
179179 // Run all the scripts we found and parsed based on the script config file tags field.
180- for mut script_f in scripts_to_run. clone ( ) {
180+ for mut script_f in scripts_to_run. iter ( ) . cloned ( ) {
181181 // This part allows us to add commandline arguments to the Script call_format, appending them to the end of the command.
182182 if !opts. command . is_empty ( ) {
183183 let user_extra_args = & opts. command . join ( " " ) ;
0 commit comments