Skip to content

Commit 329157a

Browse files
committed
crypto: rename Account::generate_one_time_keys_helper to generate_one_time_keys
1 parent f5f5ea7 commit 329157a

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

crates/matrix-sdk-crypto/src/olm/account.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ impl Account {
464464
}
465465

466466
/// Generate count number of one-time keys.
467-
pub fn generate_one_time_keys_helper(&mut self, count: usize) -> OneTimeKeyGenerationResult {
467+
pub fn generate_one_time_keys(&mut self, count: usize) -> OneTimeKeyGenerationResult {
468468
self.inner.generate_one_time_keys(count)
469469
}
470470

@@ -531,7 +531,7 @@ impl Account {
531531
let key_count = (max_keys as u64) - count;
532532
let key_count: usize = key_count.try_into().unwrap_or(max_keys);
533533

534-
let result = self.generate_one_time_keys_helper(key_count);
534+
let result = self.generate_one_time_keys(key_count);
535535

536536
debug!(
537537
count = key_count,
@@ -986,7 +986,7 @@ impl Account {
986986
) -> (Session, Session) {
987987
use ruma::events::dummy::ToDeviceDummyEventContent;
988988

989-
other.generate_one_time_keys_helper(1);
989+
other.generate_one_time_keys(1);
990990
let one_time_map = other.signed_one_time_keys();
991991
let device = ReadOnlyDevice::from_account(other);
992992

crates/matrix-sdk-crypto/src/olm/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pub(crate) mod tests {
8585
let alice = Account::with_device_id(alice_id(), alice_device_id());
8686
let mut bob = Account::with_device_id(bob_id(), bob_device_id());
8787

88-
bob.generate_one_time_keys_helper(1);
88+
bob.generate_one_time_keys(1);
8989
let one_time_key = *bob.one_time_keys().values().next().unwrap();
9090
let sender_key = bob.identity_keys().curve25519;
9191
let session = alice.create_outbound_session_helper(
@@ -116,7 +116,7 @@ pub(crate) mod tests {
116116
assert!(!one_time_keys.is_empty());
117117
assert_ne!(account.max_one_time_keys(), 0);
118118

119-
account.generate_one_time_keys_helper(10);
119+
account.generate_one_time_keys(10);
120120
let one_time_keys = account.one_time_keys();
121121

122122
assert_ne!(one_time_keys.values().len(), 0);
@@ -133,7 +133,7 @@ pub(crate) mod tests {
133133
let mut alice = Account::with_device_id(alice_id(), alice_device_id());
134134
let bob = Account::with_device_id(bob_id(), bob_device_id());
135135
let alice_keys = alice.identity_keys();
136-
alice.generate_one_time_keys_helper(1);
136+
alice.generate_one_time_keys(1);
137137
let one_time_keys = alice.one_time_keys();
138138
alice.mark_keys_as_published();
139139

crates/matrix-sdk-crypto/src/session_manager/sessions.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ mod tests {
718718

719719
assert!(request.one_time_keys.contains_key(bob.user_id()));
720720

721-
bob.generate_one_time_keys_helper(1);
721+
bob.generate_one_time_keys(1);
722722
let one_time = bob.signed_one_time_keys();
723723
assert!(!one_time.is_empty());
724724
bob.mark_keys_as_published();
@@ -882,7 +882,7 @@ mod tests {
882882

883883
assert!(request.one_time_keys.contains_key(bob.user_id()));
884884

885-
bob.generate_one_time_keys_helper(1);
885+
bob.generate_one_time_keys(1);
886886
let one_time = bob.signed_one_time_keys();
887887
assert!(!one_time.is_empty());
888888
bob.mark_keys_as_published();
@@ -1009,7 +1009,7 @@ mod tests {
10091009
// Since alice is timed out, we won't claim keys for her.
10101010
assert!(manager.get_missing_sessions(iter::once(alice)).await.unwrap().is_none());
10111011

1012-
alice_account.generate_one_time_keys_helper(1);
1012+
alice_account.generate_one_time_keys(1);
10131013
let one_time = alice_account.signed_one_time_keys();
10141014
assert!(!one_time.is_empty());
10151015

crates/matrix-sdk-crypto/src/store/integration_tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ macro_rules! cryptostore_integration_tests {
7979
let alice = Account::with_device_id(alice_id(), alice_device_id());
8080
let mut bob = Account::with_device_id(bob_id(), bob_device_id());
8181

82-
bob.generate_one_time_keys_helper(1);
82+
bob.generate_one_time_keys(1);
8383
let one_time_key = *bob.one_time_keys().values().next().unwrap();
8484
let sender_key = bob.identity_keys().curve25519;
8585
let session = alice

crates/matrix-sdk/src/sliding_sync/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ impl SlidingSync {
626626
let client = self.inner.client.clone();
627627
let e2ee_uploads = spawn(async move {
628628
if let Err(error) = client.send_outgoing_requests().await {
629-
error!(?error, "Error while sending outoging E2EE requests");
629+
error!(?error, "Error while sending outgoing E2EE requests");
630630
}
631631
})
632632
// Ensure that the task is not running in detached mode. It is aborted when it's

0 commit comments

Comments
 (0)