pkstrings: Derive Clone rather

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2020-06-30 18:01:40 +02:00
parent ee931b4f8c
commit 681813f53a
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -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))