@@ -379,7 +379,7 @@ impl PngImage {
379
379
if size < best_size {
380
380
best_size = size;
381
381
std:: mem:: swap ( & mut best_line, & mut f_buf) ;
382
- best_line_raw = line_data . clone ( ) ;
382
+ best_line_raw. clone_from ( & line_data ) ;
383
383
}
384
384
}
385
385
}
@@ -402,7 +402,7 @@ impl PngImage {
402
402
if size > best_size {
403
403
best_size = size;
404
404
std:: mem:: swap ( & mut best_line, & mut f_buf) ;
405
- best_line_raw = line_data . clone ( ) ;
405
+ best_line_raw. clone_from ( & line_data ) ;
406
406
}
407
407
}
408
408
}
@@ -421,7 +421,7 @@ impl PngImage {
421
421
if size < best_size {
422
422
best_size = size;
423
423
std:: mem:: swap ( & mut best_line, & mut f_buf) ;
424
- best_line_raw = line_data . clone ( ) ;
424
+ best_line_raw. clone_from ( & line_data ) ;
425
425
}
426
426
}
427
427
}
@@ -441,7 +441,7 @@ impl PngImage {
441
441
if size > best_size {
442
442
best_size = size;
443
443
std:: mem:: swap ( & mut best_line, & mut f_buf) ;
444
- best_line_raw = line_data . clone ( ) ;
444
+ best_line_raw. clone_from ( & line_data ) ;
445
445
}
446
446
}
447
447
}
@@ -466,7 +466,7 @@ impl PngImage {
466
466
if size < best_size {
467
467
best_size = size;
468
468
std:: mem:: swap ( & mut best_line, & mut f_buf) ;
469
- best_line_raw = line_data . clone ( ) ;
469
+ best_line_raw. clone_from ( & line_data ) ;
470
470
}
471
471
}
472
472
filtered. resize ( line_start, 0 ) ;
0 commit comments