Skip to content

Commit 0b50800

Browse files
authored
remove blanks in structs, enums, and matches (#247)
1 parent 1f2f365 commit 0b50800

File tree

13 files changed

+0
-125
lines changed

13 files changed

+0
-125
lines changed

crates/iota-crypto/src/multisig.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ impl MultisigVerifier {
3737
MultisigMemberSignature::Ed25519(ed25519_signature),
3838
) => crate::ed25519::Ed25519VerifyingKey::new(ed25519_public_key)?
3939
.verify(message, ed25519_signature),
40-
4140
#[cfg(not(feature = "secp256k1"))]
4241
(MultisigMemberPublicKey::Secp256k1(_), MultisigMemberSignature::Secp256k1(_)) => Err(
4342
SignatureError::from_source("support for secp256k1 is not enabled"),
@@ -48,7 +47,6 @@ impl MultisigVerifier {
4847
MultisigMemberSignature::Secp256k1(k1_signature),
4948
) => crate::secp256k1::Secp256k1VerifyingKey::new(k1_public_key)?
5049
.verify(message, k1_signature),
51-
5250
#[cfg(not(feature = "secp256r1"))]
5351
(MultisigMemberPublicKey::Secp256r1(_), MultisigMemberSignature::Secp256r1(_)) => Err(
5452
SignatureError::from_source("support for secp256r1 is not enabled"),
@@ -59,7 +57,6 @@ impl MultisigVerifier {
5957
MultisigMemberSignature::Secp256r1(r1_signature),
6058
) => crate::secp256r1::Secp256r1VerifyingKey::new(r1_public_key)?
6159
.verify(message, r1_signature),
62-
6360
#[cfg(not(feature = "zklogin"))]
6461
(MultisigMemberPublicKey::ZkLogin(_), MultisigMemberSignature::ZkLogin(_)) => Err(
6562
SignatureError::from_source("support for zklogin is not enabled"),
@@ -230,7 +227,6 @@ impl Verifier<UserSignature> for UserSignatureVerifier {
230227
crate::simple::SimpleVerifier.verify(message, simple_signature)
231228
}
232229
UserSignature::Multisig(multisig) => self.inner.verify(message, multisig),
233-
234230
#[cfg(not(feature = "zklogin"))]
235231
UserSignature::ZkLogin(_) => Err(SignatureError::from_source(
236232
"support for zklogin is not enabled",
@@ -383,7 +379,6 @@ fn multisig_pubkey_and_signature_from_user_signature(
383379
MultisigMemberPublicKey::Secp256r1(public_key),
384380
MultisigMemberSignature::Secp256r1(signature),
385381
)),
386-
387382
#[cfg(not(feature = "zklogin"))]
388383
UserSignature::ZkLogin(_) => Err(SignatureError::from_source(
389384
"support for zklogin is not enabled",

crates/iota-crypto/src/simple.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ impl Verifier<SimpleSignature> for SimpleVerifier {
2525
SimpleSignature::Ed25519 { .. } => Err(SignatureError::from_source(
2626
"support for ed25519 is not enabled",
2727
)),
28-
2928
#[cfg(feature = "secp256k1")]
3029
SimpleSignature::Secp256k1 {
3130
signature,
@@ -38,7 +37,6 @@ impl Verifier<SimpleSignature> for SimpleVerifier {
3837
SimpleSignature::Secp256k1 { .. } => Err(SignatureError::from_source(
3938
"support for secp256k1 is not enabled",
4039
)),
41-
4240
#[cfg(feature = "secp256r1")]
4341
SimpleSignature::Secp256r1 {
4442
signature,
@@ -157,7 +155,6 @@ mod keypair {
157155
.map(crate::ed25519::Ed25519PrivateKey::from_dalek)
158156
.map(InnerKeypair::Ed25519)
159157
.map_err(SignatureError::from_source),
160-
161158
#[cfg(feature = "secp256r1")]
162159
(
163160
p256::elliptic_curve::ALGORITHM_OID,
@@ -167,7 +164,6 @@ mod keypair {
167164
.map(crate::secp256r1::Secp256r1PrivateKey::from_p256)
168165
.map(InnerKeypair::Secp256r1)
169166
.map_err(SignatureError::from_source),
170-
171167
#[cfg(feature = "secp256k1")]
172168
(
173169
k256::elliptic_curve::ALGORITHM_OID,
@@ -177,7 +173,6 @@ mod keypair {
177173
.map(crate::secp256k1::Secp256k1PrivateKey::from_k256)
178174
.map(InnerKeypair::Secp256k1)
179175
.map_err(SignatureError::from_source),
180-
181176
_ => Err(SignatureError::from_source(
182177
"unsupported or invalid private key type",
183178
)),
@@ -338,7 +333,6 @@ mod keypair {
338333
.map(crate::ed25519::Ed25519VerifyingKey::from_dalek)
339334
.map(InnerVerifyingKey::Ed25519)
340335
.map_err(SignatureError::from_source),
341-
342336
#[cfg(feature = "secp256r1")]
343337
(
344338
p256::elliptic_curve::ALGORITHM_OID,
@@ -348,7 +342,6 @@ mod keypair {
348342
.map(crate::secp256r1::Secp256r1VerifyingKey::from_p256)
349343
.map(InnerVerifyingKey::Secp256r1)
350344
.map_err(SignatureError::from_source),
351-
352345
#[cfg(feature = "secp256k1")]
353346
(
354347
k256::elliptic_curve::ALGORITHM_OID,
@@ -358,7 +351,6 @@ mod keypair {
358351
.map(crate::secp256k1::Secp256k1VerifyingKey::from_k256)
359352
.map(InnerVerifyingKey::Secp256k1)
360353
.map_err(SignatureError::from_source),
361-
362354
_ => Err(SignatureError::from_source(
363355
"unsupported or invalid public key type",
364356
)),

crates/iota-graphql-client/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ pub struct Client {
6262
rpc: Url,
6363
/// The reqwest client.
6464
inner: reqwest::Client,
65-
6665
service_config: std::sync::OnceLock<ServiceConfig>,
6766
}
6867

crates/iota-sdk-ffi/src/types/execution_status.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,17 +534,13 @@ impl From<ExecutionError> for iota_types::ExecutionError {
534534
pub struct MoveLocation {
535535
/// The package id
536536
pub package: Arc<ObjectId>,
537-
538537
/// The module name
539538
pub module: String,
540-
541539
/// The function index
542540
pub function: u16,
543-
544541
/// Index into the code stream for a jump. The offset is relative to the
545542
/// beginning of the instruction stream.
546543
pub instruction: u16,
547-
548544
/// The name of the function if available
549545
#[uniffi(default = None)]
550546
pub function_name: Option<String>,

crates/iota-sdk-types/src/checkpoint.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,12 @@ pub struct EndOfEpochData {
7070
/// The set of Validators that will be in the ValidatorCommittee for the
7171
/// next epoch.
7272
pub next_epoch_committee: Vec<ValidatorCommitteeMember>,
73-
7473
/// The protocol version that is in effect during the next epoch.
7574
#[cfg_attr(feature = "serde", serde(with = "crate::_serde::ReadableDisplay"))]
7675
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::U64"))]
7776
pub next_epoch_protocol_version: ProtocolVersion,
78-
7977
/// Commitments to epoch specific state (e.g. live object set)
8078
pub epoch_commitments: Vec<CheckpointCommitment>,
81-
8279
/// The number of tokens that were minted (if positive) or burnt (if
8380
/// negative) in this epoch.
8481
pub epoch_supply_change: i64,
@@ -130,45 +127,36 @@ pub struct CheckpointSummary {
130127
/// Epoch that this checkpoint belongs to.
131128
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::U64"))]
132129
pub epoch: EpochId,
133-
134130
/// The height of this checkpoint.
135131
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::U64"))]
136132
pub sequence_number: CheckpointSequenceNumber,
137-
138133
/// Total number of transactions committed since genesis, including those in
139134
/// this checkpoint.
140135
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::U64"))]
141136
pub network_total_transactions: u64,
142-
143137
/// The hash of the [`CheckpointContents`] for this checkpoint.
144138
pub content_digest: Digest,
145-
146139
/// The hash of the previous `CheckpointSummary`.
147140
///
148141
/// This will be only be `None` for the first, or genesis checkpoint.
149142
pub previous_digest: Option<Digest>,
150-
151143
/// The running total gas costs of all transactions included in the current
152144
/// epoch so far until this checkpoint.
153145
pub epoch_rolling_gas_cost_summary: GasCostSummary,
154-
155146
/// Timestamp of the checkpoint - number of milliseconds from the Unix epoch
156147
/// Checkpoint timestamps are monotonic, but not strongly monotonic -
157148
/// subsequent checkpoints can have same timestamp if they originate
158149
/// from the same underlining consensus commit
159150
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::U64"))]
160151
pub timestamp_ms: CheckpointTimestamp,
161-
162152
/// Commitments to checkpoint-specific state.
163153
#[cfg_attr(
164154
feature = "schemars",
165155
schemars(with = "Option<Vec<CheckpointCommitment>>")
166156
)]
167157
pub checkpoint_commitments: Vec<CheckpointCommitment>,
168-
169158
/// Extra data only present in the final checkpoint of an epoch.
170159
pub end_of_epoch_data: Option<EndOfEpochData>,
171-
172160
/// CheckpointSummary is not an evolvable structure - it must be readable by
173161
/// any version of the code. Therefore, in order to allow extensions to
174162
/// be added to CheckpointSummary, we allow opaque data to be added to

crates/iota-sdk-types/src/crypto/passkey.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,16 @@ use super::{Secp256r1PublicKey, Secp256r1Signature, SimpleSignature};
3535
pub struct PasskeyAuthenticator {
3636
/// The secp256r1 public key for this passkey.
3737
public_key: Secp256r1PublicKey,
38-
3938
/// The secp256r1 signature from the passkey.
4039
signature: Secp256r1Signature,
41-
4240
/// Parsed base64url decoded challenge bytes from
4341
/// `client_data_json.challenge`.
4442
challenge: Vec<u8>,
45-
4643
/// Opaque authenticator data for this passkey signature.
4744
///
4845
/// See [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) for
4946
/// more information on this field.
5047
authenticator_data: Vec<u8>,
51-
5248
/// Structured, unparsed, JSON for this passkey signature.
5349
///
5450
/// See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata)
@@ -321,7 +317,6 @@ mod serialization {
321317
/// signature for another).
322318
#[serde(rename = "type")]
323319
pub ty: ClientDataType,
324-
325320
/// This member contains the base64url encoding of the challenge
326321
/// provided by the Relying Party. See the [Cryptographic
327322
/// Challenges] security consideration.
@@ -336,7 +331,6 @@ mod serialization {
336331
/// (as permitted by Section 3.2) and without the inclusion of any line
337332
/// breaks, whitespace, or other additional characters.
338333
pub challenge: String,
339-
340334
/// This member contains the fully qualified origin of the requester, as
341335
/// provided to the authenticator by the client, in the syntax
342336
/// defined by [RFC6454].

crates/iota-sdk-types/src/crypto/zklogin.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@ use crate::{checkpoint::EpochId, u256::U256};
3030
pub struct ZkLoginAuthenticator {
3131
/// Zklogin proof and inputs required to perform proof verification.
3232
pub inputs: ZkLoginInputs,
33-
3433
/// Maximum epoch for which the proof is valid.
3534
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::U64"))]
3635
pub max_epoch: EpochId,
37-
3836
/// User signature with the pubkey attested to by the provided proof.
3937
pub signature: SimpleSignature,
4038
}
@@ -57,7 +55,6 @@ pub struct ZkLoginInputs {
5755
proof_points: ZkLoginProof,
5856
iss_base64_details: ZkLoginClaim,
5957
header_base64: String,
60-
6158
// Validated types
6259
jwt_header: JwtHeader,
6360
jwk_id: JwkId,
@@ -543,13 +540,10 @@ impl ZkLoginPublicIdentifier {
543540
pub struct Jwk {
544541
/// Key type parameter, <https://datatracker.ietf.org/doc/html/rfc7517#section-4.1>
545542
pub kty: String,
546-
547543
/// RSA public exponent, <https://datatracker.ietf.org/doc/html/rfc7517#section-9.3>
548544
pub e: String,
549-
550545
/// RSA modulus, <https://datatracker.ietf.org/doc/html/rfc7517#section-9.3>
551546
pub n: String,
552-
553547
/// Algorithm parameter, <https://datatracker.ietf.org/doc/html/rfc7517#section-4.4>
554548
pub alg: String,
555549
}
@@ -573,7 +567,6 @@ pub struct Jwk {
573567
pub struct JwkId {
574568
/// The issuer or identity of the OIDC provider.
575569
pub iss: String,
576-
577570
/// A key id use to uniquely identify a key from an OIDC provider.
578571
pub kid: String,
579572
}

crates/iota-sdk-types/src/effects/v1.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,33 +34,26 @@ pub struct TransactionEffectsV1 {
3434
/// The status of the execution
3535
#[cfg_attr(feature = "schemars", schemars(flatten))]
3636
pub status: ExecutionStatus,
37-
3837
/// The epoch when this transaction was executed.
3938
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::U64"))]
4039
pub epoch: EpochId,
41-
4240
/// The gas used by this transaction
4341
pub gas_used: GasCostSummary,
44-
4542
/// The transaction digest
4643
pub transaction_digest: Digest,
4744
/// The updated gas object reference, as an index into the `changed_objects`
4845
/// vector. Having a dedicated field for convenient access.
4946
/// System transaction that don't require gas will leave this as None.
5047
pub gas_object_index: Option<u32>,
51-
5248
/// The digest of the events emitted during execution,
5349
/// can be None if the transaction does not emit any event.
5450
pub events_digest: Option<Digest>,
55-
5651
/// The set of transaction digests this transaction depends on.
5752
#[cfg_attr(feature = "proptest", any(proptest::collection::size_range(0..=5).lift()))]
5853
pub dependencies: Vec<Digest>,
59-
6054
/// The version number of all the written Move objects by this transaction.
6155
#[cfg_attr(feature = "schemars", schemars(with = "crate::_schemars::U64"))]
6256
pub lamport_version: Version,
63-
6457
/// Objects whose state are changed in the object store.
6558
#[cfg_attr(feature = "proptest", any(proptest::collection::size_range(0..=2).lift()))]
6659
pub changed_objects: Vec<ChangedObject>,
@@ -114,13 +107,10 @@ impl TransactionEffectsV1 {
114107
pub struct ChangedObject {
115108
/// Id of the object
116109
pub object_id: ObjectId,
117-
118110
/// State of the object in the store prior to this transaction.
119111
pub input_state: ObjectIn,
120-
121112
/// State of the object in the store after this transaction.
122113
pub output_state: ObjectOut,
123-
124114
/// Whether this object ID is created or deleted in this transaction.
125115
/// This information isn't required by the protocol but is useful for
126116
/// providing more detailed semantics on object changes.

crates/iota-sdk-types/src/events.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,15 @@ pub struct Event {
4242
/// Package id of the top-level function invoked by a MoveCall command which
4343
/// triggered this event to be emitted.
4444
pub package_id: ObjectId,
45-
4645
/// Module name of the top-level function invoked by a MoveCall command
4746
/// which triggered this event to be emitted.
4847
pub module: Identifier,
49-
5048
/// Address of the account that sent the transaction where this event was
5149
/// emitted.
5250
pub sender: Address,
53-
5451
/// The type of the event emitted
5552
#[cfg_attr(feature = "serde", serde(rename = "type"))]
5653
pub type_: StructTag,
57-
5854
/// BCS serialized bytes of the event
5955
#[cfg_attr(
6056
feature = "serde",
@@ -74,10 +70,8 @@ pub struct Event {
7470
pub struct BalanceChange {
7571
/// Owner of the balance change
7672
pub address: Address,
77-
7873
/// Type of the Coin
7974
pub coin_type: TypeTag,
80-
8175
/// The amount indicate the balance value changes.
8276
///
8377
/// A negative amount means spending coin value and positive means receiving

0 commit comments

Comments
 (0)