Skip to content

Commit 84917bb

Browse files
committed
Fix clippy lints
1 parent ebe9762 commit 84917bb

File tree

1 file changed

+6
-5
lines changed
  • crates/matrix-sdk-crypto/src/backups/keys

1 file changed

+6
-5
lines changed

crates/matrix-sdk-crypto/src/backups/keys/compat.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ pub enum MessageDecodeError {
176176
Key(#[from] KeyError),
177177
}
178178

179+
#[derive(Debug)]
179180
pub struct Message {
180181
pub ciphertext: Vec<u8>,
181182
pub mac: Vec<u8>,
@@ -225,12 +226,12 @@ mod test {
225226
}
226227
}
227228

228-
impl Into<PkMessage> for Message {
229-
fn into(self) -> PkMessage {
229+
impl From<Message> for PkMessage {
230+
fn from(val: Message) -> Self {
230231
PkMessage {
231-
ciphertext: encode(self.ciphertext),
232-
mac: encode(self.mac),
233-
ephemeral_key: self.ephemeral_key.to_base64(),
232+
ciphertext: encode(val.ciphertext),
233+
mac: encode(val.mac),
234+
ephemeral_key: val.ephemeral_key.to_base64(),
234235
}
235236
}
236237
}

0 commit comments

Comments
 (0)