Skip to content

Commit 3c86d6b

Browse files
authored
Merge pull request #3091 from FranciscoTGouveia/remove-clones
Remove unnecessary clones
2 parents 1257b0f + 613756e commit 3c86d6b

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/metadata/moxcms.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl super::CmsProvider for Moxcms {
7575
)?,
7676
f32: Self::build_transforms(
7777
f32_fallback.clone().map(Some),
78-
f32_fallback.clone(),
78+
f32_fallback,
7979
output_coefs,
8080
)?,
8181
output_coefs,
@@ -164,7 +164,7 @@ impl Moxcms {
164164
let trs = trs.map(Option::unwrap);
165165

166166
// rgb-rgb transforms are done directly via moxcms.
167-
let slices = trs.clone().map(|tr| {
167+
let slices = trs.map(|tr| {
168168
Arc::new(move |input: &[P], output: &mut [P]| {
169169
tr.transform(input, output).expect("transform failed")
170170
}) as Arc<dyn Fn(&[P], &mut [P]) + Send + Sync>
@@ -302,7 +302,7 @@ impl Moxcms {
302302

303303
// luma-luma both expand and contract
304304
let luma_luma = {
305-
let [tr33, tr34, tr43, tr44] = f32.clone();
305+
let [tr33, tr34, tr43, tr44] = f32;
306306

307307
[
308308
Arc::new(move |input: &[P], output: &mut [P]| {

tests/truncate_images.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ fn process_images<F>(dir: &str, input_format: ImageFormat, func: F)
1616
where
1717
F: Fn(PathBuf),
1818
{
19-
let base: PathBuf = BASE_PATH.iter().collect();
20-
let mut path = base.clone();
19+
let mut path: PathBuf = BASE_PATH.iter().collect();
2120
path.push(dir);
2221
path.push("**");
2322
path.push("*");

0 commit comments

Comments
 (0)