From 87346e1c9bae203f263ffa15b4998087c378e5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Tue, 24 May 2022 14:56:43 +0200 Subject: [PATCH] events: Allow internal use of deprecated fields --- crates/ruma-common/src/events/room/encrypted.rs | 1 + crates/ruma-common/src/events/room_key_request.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/ruma-common/src/events/room/encrypted.rs b/crates/ruma-common/src/events/room/encrypted.rs index 3c58687a..666e7ba4 100644 --- a/crates/ruma-common/src/events/room/encrypted.rs +++ b/crates/ruma-common/src/events/room/encrypted.rs @@ -305,6 +305,7 @@ impl From for MegolmV1AesSha2Content { /// Creates a new `MegolmV1AesSha2Content` from the given init struct. fn from(init: MegolmV1AesSha2ContentInit) -> Self { let MegolmV1AesSha2ContentInit { ciphertext, sender_key, device_id, session_id } = init; + #[allow(deprecated)] Self { ciphertext, sender_key, device_id, session_id } } } diff --git a/crates/ruma-common/src/events/room_key_request.rs b/crates/ruma-common/src/events/room_key_request.rs index b3ab9581..63c301df 100644 --- a/crates/ruma-common/src/events/room_key_request.rs +++ b/crates/ruma-common/src/events/room_key_request.rs @@ -100,6 +100,7 @@ impl RequestedKeyInfo { sender_key: String, session_id: String, ) -> Self { + #[allow(deprecated)] Self { algorithm, room_id, sender_key, session_id } } }