Fix clippy lints

This commit is contained in:
Jonas Platte
2023-05-26 10:44:52 +02:00
committed by Jonas Platte
parent ebe97623aa
commit 84917bb59d

View File

@@ -176,6 +176,7 @@ pub enum MessageDecodeError {
Key(#[from] KeyError),
}
#[derive(Debug)]
pub struct Message {
pub ciphertext: Vec<u8>,
pub mac: Vec<u8>,
@@ -225,12 +226,12 @@ mod test {
}
}
impl Into<PkMessage> for Message {
fn into(self) -> PkMessage {
impl From<Message> for PkMessage {
fn from(val: Message) -> Self {
PkMessage {
ciphertext: encode(self.ciphertext),
mac: encode(self.mac),
ephemeral_key: self.ephemeral_key.to_base64(),
ciphertext: encode(val.ciphertext),
mac: encode(val.mac),
ephemeral_key: val.ephemeral_key.to_base64(),
}
}
}