From a6a0ed1f42caaae9209401364b59f800c60f0e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Mon, 2 Sep 2024 16:14:28 +0200 Subject: [PATCH] Constify some more functions --- src/olm/messages/pre_key.rs | 2 +- src/olm/session/message_key.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/olm/messages/pre_key.rs b/src/olm/messages/pre_key.rs index ce659b30..5a89ebba 100644 --- a/src/olm/messages/pre_key.rs +++ b/src/olm/messages/pre_key.rs @@ -153,7 +153,7 @@ impl PreKeyMessage { /// Create a new pre-key message from the session keys and standard message. #[cfg(feature = "low-level-api")] - pub fn wrap(session_keys: SessionKeys, message: Message) -> Self { + pub const fn wrap(session_keys: SessionKeys, message: Message) -> Self { PreKeyMessage::new(session_keys, message) } diff --git a/src/olm/session/message_key.rs b/src/olm/session/message_key.rs index 602610a3..1c690e50 100644 --- a/src/olm/session/message_key.rs +++ b/src/olm/session/message_key.rs @@ -95,13 +95,13 @@ impl MessageKey { /// Get the message key's ratchet key. #[cfg(feature = "low-level-api")] - pub fn ratchet_key(&self) -> RatchetPublicKey { + pub const fn ratchet_key(&self) -> RatchetPublicKey { self.ratchet_key } /// Get the message key's index. #[cfg(feature = "low-level-api")] - pub fn index(&self) -> u64 { + pub const fn index(&self) -> u64 { self.index } }