Skip to content

Using references in init_scripts() to avoid unnecessary .clone()s#618

Merged
PsypherPunk merged 3 commits into
bee-san:masterfrom
Arvmor:master
Aug 28, 2024
Merged

Using references in init_scripts() to avoid unnecessary .clone()s#618
PsypherPunk merged 3 commits into
bee-san:masterfrom
Arvmor:master

Conversation

@Arvmor
Copy link
Copy Markdown
Contributor

@Arvmor Arvmor commented Jul 11, 2024

ISSUE

the init_scripts() function includes a few unnecessary .clone()s which could be easily avoided through using references, the error handling is slightly verbose and if statements could also be less verbose by using if let.

https://github.com/RustScan/RustScan/blob/9f35cd43bc4124c479d54a0664503b6165fe9dfd/src/scripts/mod.rs#L129-L148

FIX

https://github.com/RustScan/RustScan/blob/033e2810f28be22610030e1974bf7fb351c9c4a6/src/scripts/mod.rs#L120-L135

Copy link
Copy Markdown
Collaborator

@PsypherPunk PsypherPunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice; I am entirely in favour of this.

@PsypherPunk
Copy link
Copy Markdown
Collaborator

@Arvmor, just sorting some failures in the build pipeline but this should be good to go.

@Arvmor
Copy link
Copy Markdown
Contributor Author

Arvmor commented Aug 16, 2024

@Arvmor, just sorting some failures in the build pipeline but this should be good to go.

Great!! If anything comes up please let me know.

@PsypherPunk PsypherPunk merged commit a6f04c5 into bee-san:master Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants