Skip to content

Commit 2c3321b

Browse files
andrews05AlexTMjugador
authored andcommitted
Fix clippy lints
1 parent 3e3c027 commit 2c3321b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/png/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ impl PngImage {
379379
if size < best_size {
380380
best_size = size;
381381
std::mem::swap(&mut best_line, &mut f_buf);
382-
best_line_raw = line_data.clone();
382+
best_line_raw.clone_from(&line_data);
383383
}
384384
}
385385
}
@@ -402,7 +402,7 @@ impl PngImage {
402402
if size > best_size {
403403
best_size = size;
404404
std::mem::swap(&mut best_line, &mut f_buf);
405-
best_line_raw = line_data.clone();
405+
best_line_raw.clone_from(&line_data);
406406
}
407407
}
408408
}
@@ -421,7 +421,7 @@ impl PngImage {
421421
if size < best_size {
422422
best_size = size;
423423
std::mem::swap(&mut best_line, &mut f_buf);
424-
best_line_raw = line_data.clone();
424+
best_line_raw.clone_from(&line_data);
425425
}
426426
}
427427
}
@@ -441,7 +441,7 @@ impl PngImage {
441441
if size > best_size {
442442
best_size = size;
443443
std::mem::swap(&mut best_line, &mut f_buf);
444-
best_line_raw = line_data.clone();
444+
best_line_raw.clone_from(&line_data);
445445
}
446446
}
447447
}
@@ -466,7 +466,7 @@ impl PngImage {
466466
if size < best_size {
467467
best_size = size;
468468
std::mem::swap(&mut best_line, &mut f_buf);
469-
best_line_raw = line_data.clone();
469+
best_line_raw.clone_from(&line_data);
470470
}
471471
}
472472
filtered.resize(line_start, 0);

0 commit comments

Comments
 (0)