Skip to content

Commit

Permalink
Constify some more functions
Browse files Browse the repository at this point in the history
  • Loading branch information
poljar committed Sep 10, 2024
1 parent 84be52d commit a6a0ed1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/olm/messages/pre_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions src/olm/session/message_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit a6a0ed1

Please sign in to comment.