Skip to content

Commit dd1b315

Browse files
authored
Merge pull request #8328 from nyurik/expl_impl_clone_on_copy
chore: fix expl_impl_clone_on_copy lint
2 parents 685969e + c7b981f commit dd1b315

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,4 +663,3 @@ inline_always = "allow" # 6
663663
fn_params_excessive_bools = "allow" # 6
664664
used_underscore_items = "allow" # 2
665665
should_panic_without_expect = "allow" # 2
666-
expl_impl_clone_on_copy = "allow" # 2

src/uu/od/src/formatteriteminfo.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,13 @@
77
use std::fmt;
88

99
#[allow(clippy::enum_variant_names)]
10-
#[derive(Copy, PartialEq, Eq)]
10+
#[derive(Clone, Copy, PartialEq, Eq)]
1111
pub enum FormatWriter {
1212
IntWriter(fn(u64) -> String),
1313
FloatWriter(fn(f64) -> String),
1414
MultibyteWriter(fn(&[u8]) -> String),
1515
}
1616

17-
impl Clone for FormatWriter {
18-
#[inline]
19-
fn clone(&self) -> Self {
20-
*self
21-
}
22-
}
23-
2417
impl fmt::Debug for FormatWriter {
2518
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2619
match *self {

0 commit comments

Comments
 (0)