Skip to content

Commit fa768a1

Browse files
committed
style: run formatter on comments and doc strings
1 parent 8fb4155 commit fa768a1

File tree

56 files changed

+214
-140
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+214
-140
lines changed

crypto-ffi/src/core_crypto_context/mls.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ impl CoreCryptoContext {
379379

380380
/// Get all credentials from this client which match the provided parameters.
381381
///
382-
/// Parameters which are unset or `None` match anything. Those with a particular value find only credentials matching that value.
382+
/// Parameters which are unset or `None` match anything. Those with a particular value find only credentials
383+
/// matching that value.
383384
pub async fn find_credentials(
384385
&self,
385386
client_id: Option<ClientIdMaybeArc>,

crypto-ffi/src/core_crypto_context/proteus.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ impl CoreCryptoContext {
105105
proteus_impl!({ self.inner.proteus_new_prekey(prekey_id).await.map_err(Into::into) })
106106
}
107107

108-
/// Creates a new Proteus prekey with an automatically incremented ID and returns the CBOR-serialized version of the prekey bundle
108+
/// Creates a new Proteus prekey with an automatically incremented ID and returns the CBOR-serialized version of the
109+
/// prekey bundle
109110
///
110111
/// Warning: The Proteus client **MUST** be initialized with `proteus_init` first or an error will be returned
111112
///

crypto-ffi/src/credential.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use crate::{Ciphersuite, CoreCryptoResult, CredentialType, client_id::ClientIdMa
1010
/// This is tied to a particular client via either its client id or certificate bundle,
1111
/// depending on its credential type, but is independent of any client instance or storage.
1212
///
13-
/// To attach to a particular client instance and store, see [`CoreCryptoContext::add_credential`][crate::CoreCryptoContext::add_credential].
13+
/// To attach to a particular client instance and store, see
14+
/// [`CoreCryptoContext::add_credential`][crate::CoreCryptoContext::add_credential].
1415
#[derive(Debug, Clone, derive_more::From, derive_more::Into, uniffi::Object)]
1516
pub struct Credential(pub(crate) CryptoCredential);
1617

crypto-ffi/src/decrypted_message.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ pub struct DecryptedMessage {
1818
/// Commit delay in seconds.
1919
///
2020
/// When set, clients must delay this long before processing a commit.
21-
/// This reduces load on the backend, which otherwise would receive epoch change notifications from all clients simultaneously.
21+
/// This reduces load on the backend, which otherwise would receive epoch change notifications from all clients
22+
/// simultaneously.
2223
pub commit_delay: Option<u64>,
2324
/// [ClientId] of the sender of the message being decrypted. Only present for application messages.
2425
pub sender_client_id: Option<ClientIdMaybeArc>,
@@ -76,7 +77,8 @@ pub struct BufferedDecryptedMessage {
7677
/// Commit delay in seconds.
7778
///
7879
/// When set, clients must delay this long before processing a commit.
79-
/// This reduces load on the backend, which otherwise would receive epoch change notifications from all clients simultaneously.
80+
/// This reduces load on the backend, which otherwise would receive epoch change notifications from all clients
81+
/// simultaneously.
8082
pub commit_delay: Option<u64>,
8183
/// [ClientId] of the sender of the message being decrypted. Only present for application messages.
8284
pub sender_client_id: Option<ClientIdMaybeArc>,

crypto-ffi/src/e2ei/acme_challenge.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
/// - See [core_crypto::e2e_identity::types::E2eiAcmeChallenge]
55
#[derive(Debug, Clone, uniffi::Record)]
66
pub struct AcmeChallenge {
7-
/// Contains raw JSON data of this challenge. This is parsed by the underlying Rust library hence should not be accessed
7+
/// Contains raw JSON data of this challenge. This is parsed by the underlying Rust library hence should not be
8+
/// accessed
89
pub delegate: Vec<u8>,
910
/// URL of this challenge
1011
pub url: String,
1112
/// Non-standard, Wire specific claim. Indicates the consumer from where it should get the challenge proof.
12-
/// Either from wire-server "/access-token" endpoint in case of a DPoP challenge, or from an OAuth token endpoint for an OIDC challenge
13+
/// Either from wire-server "/access-token" endpoint in case of a DPoP challenge, or from an OAuth token endpoint
14+
/// for an OIDC challenge
1315
pub target: String,
1416
}
1517

crypto-ffi/src/e2ei/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ pub enum E2eiConversationState {
1515
Verified = 1,
1616
/// Some clients are either still Basic or their certificate is expired
1717
NotVerified,
18-
/// All clients are still Basic. If all client have expired certificates, [E2eiConversationState::NotVerified] is returned.
18+
/// All clients are still Basic. If all client have expired certificates, [E2eiConversationState::NotVerified] is
19+
/// returned.
1920
NotEnabled,
2021
}
2122

crypto-ffi/src/error/mls.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ pub enum MlsError {
3333
#[error("The received commit is deemed stale and is from an older epoch.")]
3434
StaleCommit,
3535
/// This happens when the DS cannot flag KeyPackages as claimed or not. In this scenario, a client
36-
/// requests their old KeyPackages to be deleted but one has already been claimed by another client to create a Welcome.
37-
/// In that case the only solution is that the client receiving such a Welcome tries to join the group
36+
/// requests their old KeyPackages to be deleted but one has already been claimed by another client to create a
37+
/// Welcome. In that case the only solution is that the client receiving such a Welcome tries to join the group
3838
/// with an External Commit instead
3939
#[error(
4040
"Although this Welcome seems valid, the local KeyPackage it references has already been deleted locally. Join this group with an external commit"

crypto-ffi/src/identity/x509.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::time::{Duration, SystemTime};
22

3-
/// Represents the parts of [WireIdentity][crate::WireIdentity] that are specific to a X509 certificate (and not a Basic one).
3+
/// Represents the parts of [WireIdentity][crate::WireIdentity] that are specific to a X509 certificate (and not a Basic
4+
/// one).
45
///
56
/// We don't use an enum here since the sole purpose of this is to be exposed through the FFI (and
67
/// union types are impossible to carry over the FFI boundary)

crypto/benches/commit.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ fn commit_add_n_clients_bench(c: &mut Criterion) {
7171
}
7272

7373
/// Benchmark to measure the impact of group size on the runtime of creating and merging a remove commit.
74-
/// Number of removed clients is equal to group size (→ all clients except the initial client from [setup_mls] are removed).
74+
/// Number of removed clients is equal to group size (→ all clients except the initial client from [setup_mls] are
75+
/// removed).
7576
fn commit_remove_bench(c: &mut Criterion) {
7677
let mut group = c.benchmark_group("Commit remove f(group size)");
7778
for (case, ciphersuite, credential, in_memory) in MlsTestCase::values() {

crypto/benches/utils/mls.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ pub async fn setup_mls(
153153

154154
pub async fn new_central(
155155
ciphersuite: Ciphersuite,
156-
// TODO: always None for the moment. Need to update the benches with some realistic certificates. Tracking issue: WPB-9589
156+
// TODO: always None for the moment. Need to update the benches with some realistic certificates. Tracking issue:
157+
// WPB-9589
157158
_credential: Option<&CertificateBundle>,
158159
in_memory: bool,
159160
with_basic_credential: bool,

0 commit comments

Comments
 (0)