mirror of
https://github.com/ivre/masscanned.git
synced 2025-10-02 06:38:21 +00:00
Remove unneeded .clone() call
`pattern` is a reference, and according to `cargo test` output: "the type `[u8]` does not implement `Clone`, so calling `clone` on `&[u8]` copies the reference, which does not do anything and can be removed".
This commit is contained in:
parent
7406a1a191
commit
b642c34e42
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ pub struct Smack {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_copy_of_pattern(pattern: &[u8], is_nocase: bool) -> Vec<u8> {
|
fn make_copy_of_pattern(pattern: &[u8], is_nocase: bool) -> Vec<u8> {
|
||||||
let mut p = pattern.clone().to_vec();
|
let mut p = pattern.to_vec();
|
||||||
for i in 0..p.len() {
|
for i in 0..p.len() {
|
||||||
if is_nocase {
|
if is_nocase {
|
||||||
p[i] = p[i].to_ascii_lowercase();
|
p[i] = p[i].to_ascii_lowercase();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue