Skip to content

Commit caccc77

Browse files
committed
cargo-fixn' stuff
1 parent 5eaf563 commit caccc77

File tree

12 files changed

+44
-44
lines changed

12 files changed

+44
-44
lines changed

nucypher-core-wasm/tests/wasm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ fn fleet_state_checksum_to_bytes() {
612612
let fleet_state_checksum = make_fleet_state_checksum();
613613

614614
assert!(
615-
fleet_state_checksum.to_bytes().len() > 0,
615+
!fleet_state_checksum.to_bytes().is_empty(),
616616
"FleetStateChecksum does not serialize to bytes"
617617
);
618618
}

nucypher-core/src/access_control.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl AuthenticatedData {
4343
}
4444
}
4545

46-
impl<'a> ProtocolObjectInner<'a> for AuthenticatedData {
46+
impl ProtocolObjectInner<'_> for AuthenticatedData {
4747
fn version() -> (u16, u16) {
4848
(1, 0)
4949
}
@@ -65,7 +65,7 @@ impl<'a> ProtocolObjectInner<'a> for AuthenticatedData {
6565
}
6666
}
6767

68-
impl<'a> ProtocolObject<'a> for AuthenticatedData {}
68+
impl ProtocolObject<'_> for AuthenticatedData {}
6969

7070
/// Encrypt data based on conditions and dkg public key.
7171
pub fn encrypt_for_dkg(
@@ -118,7 +118,7 @@ impl AccessControlPolicy {
118118
}
119119
}
120120

121-
impl<'a> ProtocolObjectInner<'a> for AccessControlPolicy {
121+
impl ProtocolObjectInner<'_> for AccessControlPolicy {
122122
fn version() -> (u16, u16) {
123123
(1, 0)
124124
}
@@ -140,7 +140,7 @@ impl<'a> ProtocolObjectInner<'a> for AccessControlPolicy {
140140
}
141141
}
142142

143-
impl<'a> ProtocolObject<'a> for AccessControlPolicy {}
143+
impl ProtocolObject<'_> for AccessControlPolicy {}
144144

145145
#[cfg(test)]
146146
mod tests {

nucypher-core/src/dkg.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ pub mod session {
221221
}
222222
}
223223

224-
impl<'a> ProtocolObjectInner<'a> for SessionStaticKey {
224+
impl ProtocolObjectInner<'_> for SessionStaticKey {
225225
fn version() -> (u16, u16) {
226226
(2, 0)
227227
}
@@ -246,7 +246,7 @@ pub mod session {
246246
}
247247
}
248248

249-
impl<'a> ProtocolObject<'a> for SessionStaticKey {}
249+
impl ProtocolObject<'_> for SessionStaticKey {}
250250

251251
/// A session secret key.
252252
#[derive(ZeroizeOnDrop)]
@@ -402,7 +402,7 @@ impl ThresholdDecryptionRequest {
402402
}
403403
}
404404

405-
impl<'a> ProtocolObjectInner<'a> for ThresholdDecryptionRequest {
405+
impl ProtocolObjectInner<'_> for ThresholdDecryptionRequest {
406406
fn version() -> (u16, u16) {
407407
(4, 0)
408408
}
@@ -424,7 +424,7 @@ impl<'a> ProtocolObjectInner<'a> for ThresholdDecryptionRequest {
424424
}
425425
}
426426

427-
impl<'a> ProtocolObject<'a> for ThresholdDecryptionRequest {}
427+
impl ProtocolObject<'_> for ThresholdDecryptionRequest {}
428428

429429
/// An encrypted request for an Ursula to derive a decryption share.
430430
#[derive(PartialEq, Debug, Clone, Serialize, Deserialize)]
@@ -467,7 +467,7 @@ impl EncryptedThresholdDecryptionRequest {
467467
}
468468
}
469469

470-
impl<'a> ProtocolObjectInner<'a> for EncryptedThresholdDecryptionRequest {
470+
impl ProtocolObjectInner<'_> for EncryptedThresholdDecryptionRequest {
471471
fn version() -> (u16, u16) {
472472
(2, 0)
473473
}
@@ -489,7 +489,7 @@ impl<'a> ProtocolObjectInner<'a> for EncryptedThresholdDecryptionRequest {
489489
}
490490
}
491491

492-
impl<'a> ProtocolObject<'a> for EncryptedThresholdDecryptionRequest {}
492+
impl ProtocolObject<'_> for EncryptedThresholdDecryptionRequest {}
493493

494494
/// A response from Ursula with a derived decryption share.
495495
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
@@ -520,7 +520,7 @@ impl ThresholdDecryptionResponse {
520520
}
521521
}
522522

523-
impl<'a> ProtocolObjectInner<'a> for ThresholdDecryptionResponse {
523+
impl ProtocolObjectInner<'_> for ThresholdDecryptionResponse {
524524
fn version() -> (u16, u16) {
525525
(2, 0)
526526
}
@@ -542,7 +542,7 @@ impl<'a> ProtocolObjectInner<'a> for ThresholdDecryptionResponse {
542542
}
543543
}
544544

545-
impl<'a> ProtocolObject<'a> for ThresholdDecryptionResponse {}
545+
impl ProtocolObject<'_> for ThresholdDecryptionResponse {}
546546

547547
/// An encrypted response from Ursula with a derived decryption share.
548548
#[derive(PartialEq, Debug, Clone, Serialize, Deserialize)]
@@ -578,7 +578,7 @@ impl EncryptedThresholdDecryptionResponse {
578578
}
579579
}
580580

581-
impl<'a> ProtocolObjectInner<'a> for EncryptedThresholdDecryptionResponse {
581+
impl ProtocolObjectInner<'_> for EncryptedThresholdDecryptionResponse {
582582
fn version() -> (u16, u16) {
583583
(2, 0)
584584
}
@@ -600,7 +600,7 @@ impl<'a> ProtocolObjectInner<'a> for EncryptedThresholdDecryptionResponse {
600600
}
601601
}
602602

603-
impl<'a> ProtocolObject<'a> for EncryptedThresholdDecryptionResponse {}
603+
impl ProtocolObject<'_> for EncryptedThresholdDecryptionResponse {}
604604

605605
#[cfg(test)]
606606
mod tests {

nucypher-core/src/fleet_state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl FleetStateChecksum {
3737
// so this may lead to unnecessary fleet state update.
3838
// But, unlike ProtocolObject::to_bytes(), payload serialization
3939
// is not standardized, so it is better not to rely on it.
40-
digest.chain(&node.to_bytes())
40+
digest.chain(node.to_bytes())
4141
})
4242
.finalize();
4343

nucypher-core/src/key_frag.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl AuthorizedKeyFrag {
5252
}
5353
}
5454

55-
impl<'a> ProtocolObjectInner<'a> for AuthorizedKeyFrag {
55+
impl ProtocolObjectInner<'_> for AuthorizedKeyFrag {
5656
fn brand() -> [u8; 4] {
5757
*b"AKFr"
5858
}
@@ -74,7 +74,7 @@ impl<'a> ProtocolObjectInner<'a> for AuthorizedKeyFrag {
7474
}
7575
}
7676

77-
impl<'a> ProtocolObject<'a> for AuthorizedKeyFrag {}
77+
impl ProtocolObject<'_> for AuthorizedKeyFrag {}
7878

7979
#[allow(clippy::enum_variant_names)]
8080
#[derive(Debug)]
@@ -144,7 +144,7 @@ impl EncryptedKeyFrag {
144144
}
145145
}
146146

147-
impl<'a> ProtocolObjectInner<'a> for EncryptedKeyFrag {
147+
impl ProtocolObjectInner<'_> for EncryptedKeyFrag {
148148
fn brand() -> [u8; 4] {
149149
*b"EKFr"
150150
}
@@ -166,4 +166,4 @@ impl<'a> ProtocolObjectInner<'a> for EncryptedKeyFrag {
166166
}
167167
}
168168

169-
impl<'a> ProtocolObject<'a> for EncryptedKeyFrag {}
169+
impl ProtocolObject<'_> for EncryptedKeyFrag {}

nucypher-core/src/message_kit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ impl MessageKit {
6767
}
6868
}
6969

70-
impl<'a> ProtocolObjectInner<'a> for MessageKit {
70+
impl ProtocolObjectInner<'_> for MessageKit {
7171
fn brand() -> [u8; 4] {
7272
*b"MKit"
7373
}
@@ -89,4 +89,4 @@ impl<'a> ProtocolObjectInner<'a> for MessageKit {
8989
}
9090
}
9191

92-
impl<'a> ProtocolObject<'a> for MessageKit {}
92+
impl ProtocolObject<'_> for MessageKit {}

nucypher-core/src/node_metadata.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl NodeMetadata {
122122
}
123123
}
124124

125-
impl<'a> ProtocolObjectInner<'a> for NodeMetadata {
125+
impl ProtocolObjectInner<'_> for NodeMetadata {
126126
fn brand() -> [u8; 4] {
127127
*b"NdMd"
128128
}
@@ -148,7 +148,7 @@ impl<'a> ProtocolObjectInner<'a> for NodeMetadata {
148148
}
149149
}
150150

151-
impl<'a> ProtocolObject<'a> for NodeMetadata {}
151+
impl ProtocolObject<'_> for NodeMetadata {}
152152

153153
/// A request for metadata exchange.
154154
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
@@ -169,7 +169,7 @@ impl MetadataRequest {
169169
}
170170
}
171171

172-
impl<'a> ProtocolObjectInner<'a> for MetadataRequest {
172+
impl ProtocolObjectInner<'_> for MetadataRequest {
173173
fn brand() -> [u8; 4] {
174174
*b"MdRq"
175175
}
@@ -191,7 +191,7 @@ impl<'a> ProtocolObjectInner<'a> for MetadataRequest {
191191
}
192192
}
193193

194-
impl<'a> ProtocolObject<'a> for MetadataRequest {}
194+
impl ProtocolObject<'_> for MetadataRequest {}
195195

196196
/// Payload of the metadata response.
197197
#[derive(PartialEq, Eq, Debug, Serialize, Deserialize, Clone)]
@@ -250,7 +250,7 @@ impl MetadataResponse {
250250
}
251251
}
252252

253-
impl<'a> ProtocolObjectInner<'a> for MetadataResponse {
253+
impl ProtocolObjectInner<'_> for MetadataResponse {
254254
fn brand() -> [u8; 4] {
255255
*b"MdRs"
256256
}
@@ -277,4 +277,4 @@ impl<'a> ProtocolObjectInner<'a> for MetadataResponse {
277277
}
278278
}
279279

280-
impl<'a> ProtocolObject<'a> for MetadataResponse {}
280+
impl ProtocolObject<'_> for MetadataResponse {}

nucypher-core/src/reencryption.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl ReencryptionRequest {
5555
}
5656
}
5757

58-
impl<'a> ProtocolObjectInner<'a> for ReencryptionRequest {
58+
impl ProtocolObjectInner<'_> for ReencryptionRequest {
5959
fn brand() -> [u8; 4] {
6060
*b"ReRq"
6161
}
@@ -77,7 +77,7 @@ impl<'a> ProtocolObjectInner<'a> for ReencryptionRequest {
7777
}
7878
}
7979

80-
impl<'a> ProtocolObject<'a> for ReencryptionRequest {}
80+
impl ProtocolObject<'_> for ReencryptionRequest {}
8181

8282
/// A response from Ursula with reencrypted capsule frags.
8383
#[derive(PartialEq, Debug, Serialize, Deserialize, Clone)]
@@ -169,7 +169,7 @@ impl ReencryptionResponse {
169169
}
170170
}
171171

172-
impl<'a> ProtocolObjectInner<'a> for ReencryptionResponse {
172+
impl ProtocolObjectInner<'_> for ReencryptionResponse {
173173
fn brand() -> [u8; 4] {
174174
*b"ReRs"
175175
}
@@ -191,7 +191,7 @@ impl<'a> ProtocolObjectInner<'a> for ReencryptionResponse {
191191
}
192192
}
193193

194-
impl<'a> ProtocolObject<'a> for ReencryptionResponse {}
194+
impl ProtocolObject<'_> for ReencryptionResponse {}
195195

196196
#[cfg(test)]
197197
mod tests {

nucypher-core/src/retrieval_kit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl RetrievalKit {
5050
}
5151
}
5252

53-
impl<'a> ProtocolObjectInner<'a> for RetrievalKit {
53+
impl ProtocolObjectInner<'_> for RetrievalKit {
5454
fn brand() -> [u8; 4] {
5555
*b"RKit"
5656
}
@@ -72,4 +72,4 @@ impl<'a> ProtocolObjectInner<'a> for RetrievalKit {
7272
}
7373
}
7474

75-
impl<'a> ProtocolObject<'a> for RetrievalKit {}
75+
impl ProtocolObject<'_> for RetrievalKit {}

nucypher-core/src/revocation_order.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl RevocationOrder {
5959
}
6060
}
6161

62-
impl<'a> ProtocolObjectInner<'a> for RevocationOrder {
62+
impl ProtocolObjectInner<'_> for RevocationOrder {
6363
fn brand() -> [u8; 4] {
6464
*b"Revo"
6565
}
@@ -81,4 +81,4 @@ impl<'a> ProtocolObjectInner<'a> for RevocationOrder {
8181
}
8282
}
8383

84-
impl<'a> ProtocolObject<'a> for RevocationOrder {}
84+
impl ProtocolObject<'_> for RevocationOrder {}

0 commit comments

Comments
 (0)