Skip to content

Commit

Permalink
perf: clippy::cloned_instead_of_copied (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdJoPaTo authored and joshka committed Mar 4, 2024
1 parent 5b00e3a commit a13867f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -64,6 +64,7 @@ serde_json = "1.0.109"
[lints.rust]
unsafe_code = "forbid"
[lints.clippy]
cloned_instead_of_copied = "warn"
explicit_iter_loop = "warn"
missing_const_for_fn = "warn"
needless_for_each = "warn"
Expand Down
15 changes: 0 additions & 15 deletions src/layout/layout.rs
Expand Up @@ -1984,7 +1984,6 @@ mod tests {
.flex(Flex::Legacy)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand All @@ -2004,7 +2003,6 @@ mod tests {
.flex(Flex::Start)
.split(rect)
.iter()
.cloned()
.map(|r| (r.x, r.width))
.collect::<Vec<(u16, u16)>>();
assert_eq!(expected, r);
Expand Down Expand Up @@ -2036,7 +2034,6 @@ mod tests {
.flex(Flex::Legacy)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand Down Expand Up @@ -2067,7 +2064,6 @@ mod tests {
.flex(Flex::Start)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand All @@ -2077,7 +2073,6 @@ mod tests {
.flex(Flex::Center)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand All @@ -2087,7 +2082,6 @@ mod tests {
.flex(Flex::End)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand All @@ -2097,7 +2091,6 @@ mod tests {
.flex(Flex::SpaceAround)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand All @@ -2107,7 +2100,6 @@ mod tests {
.flex(Flex::SpaceBetween)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand All @@ -2122,7 +2114,6 @@ mod tests {
.flex(Flex::Legacy)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand Down Expand Up @@ -2170,7 +2161,6 @@ mod tests {
.flex(Flex::Legacy)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand All @@ -2188,7 +2178,6 @@ mod tests {
.flex(Flex::Legacy)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand All @@ -2207,7 +2196,6 @@ mod tests {
.flex(Flex::Legacy)
.split(rect)
.iter()
.cloned()
.map(|r| r.width)
.collect::<Vec<u16>>();
assert_eq!(expected, r);
Expand Down Expand Up @@ -2272,7 +2260,6 @@ mod tests {
.flex(flex)
.split(rect)
.iter()
.cloned()
.map(|r| (r.x, r.width))
.collect::<Vec<(u16, u16)>>();
assert_eq!(expected, r);
Expand Down Expand Up @@ -2331,7 +2318,6 @@ mod tests {
.flex(Flex::Legacy)
.split(rect)
.iter()
.cloned()
.map(|r| (r.x, r.width))
.collect::<Vec<(u16, u16)>>();
assert_eq!(expected, r);
Expand All @@ -2356,7 +2342,6 @@ mod tests {
.flex(flex)
.split(rect)
.iter()
.cloned()
.map(|r| (r.x, r.width))
.collect::<Vec<(u16, u16)>>();
assert_eq!(expected, r);
Expand Down

0 comments on commit a13867f

Please sign in to comment.