Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Jul 18, 2022
1 parent 27a64b7 commit dcbd8c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust/protocol/src/session_cipher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub async fn message_encrypt(
remote_address,
items
.pre_key_id()
.map_or_else(|| "<none>".to_string(), |id| format!("{}", id))
.map_or_else(|| "<none>".to_string(), |id| id.to_string())
);

let message = SignalMessage::new(
Expand Down
4 changes: 2 additions & 2 deletions rust/protocol/src/state/session.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright 2020 Signal Messenger, LLC.
// Copyright 2020-2022 Signal Messenger, LLC.
// SPDX-License-Identifier: AGPL-3.0-only
//

Expand Down Expand Up @@ -403,7 +403,7 @@ impl SessionState {
) {
let signed_pre_key_id: u32 = signed_pre_key_id.into();
let pending = session_structure::PendingPreKey {
pre_key_id: pre_key_id.unwrap_or_else(|| 0.into()).into(),
pre_key_id: pre_key_id.map(PreKeyId::into).unwrap_or(0),
signed_pre_key_id: signed_pre_key_id as i32,
base_key: base_key.serialize().to_vec(),
};
Expand Down

0 comments on commit dcbd8c3

Please sign in to comment.