From 681813f53a899bcb284c7ebc94c2fdc9e404b0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 30 Jun 2020 18:01:40 +0200 Subject: [PATCH] pkstrings: Derive Clone rather MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- pkstrings/src/lib.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkstrings/src/lib.rs b/pkstrings/src/lib.rs index 63e67a3..2216e40 100644 --- a/pkstrings/src/lib.rs +++ b/pkstrings/src/lib.rs @@ -215,7 +215,7 @@ pub enum Error { InvalidCharacter, } -#[derive(Debug, Eq, PartialEq)] +#[derive(Debug, Clone, Eq, PartialEq)] pub struct PKString(String); impl Deref for PKString { @@ -226,12 +226,6 @@ impl Deref for PKString { } } -impl Clone for PKString { - fn clone(&self) -> PKString { - PKString(self.0.clone()) - } -} - impl fmt::Display for PKString { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.write_fmt(format_args!("{}", &self.0))