Modern Apps git

← Modern-Apps.git

communicate: clippy hygiene in crypto wire coverage test

Commit
8c7dd5e9d68644cf566b9a96579febeeda059928
Author
Vayun Mathur <[email protected]>
When
2026-12-01 22:01 UTC (4 days ago)
Parents
82ad696
Workspace clippy flagged: a match used to destructure a
single Ok pattern (now if let; the Err arm asserted nothing)
and matches!(other, Some(_)) in a panic message (now
other.is_some()). Same assertions, same failure output shape.

Verified: cargo clippy -p communicate_signal --all-targets
clean, cargo test -p communicate_signal green, fmt clean.

Diff

communicate-dev/src/main/rust/tests/coverage_crypto_wire.rs
diff --git a/communicate-dev/src/main/rust/tests/coverage_crypto_wire.rs b/communicate-dev/src/main/rust/tests/coverage_crypto_wire.rsindex a87ef77328..e64ab2ea87 100644--- a/communicate-dev/src/main/rust/tests/coverage_crypto_wire.rs+++ b/communicate-dev/src/main/rust/tests/coverage_crypto_wire.rs@@ -107,9 +107,8 @@ fn aes_cbc_rejects_bad_padding_and_shape() {         assert!(crypto::aes_cbc_decrypt(&key, &iv, &bad).is_err(), "flip {flip:#x}");     }     // Wrong key cannot produce the original plaintext (padding or content).-    match crypto::aes_cbc_decrypt(&[0u8; 32], &iv, &ct) {-        Ok(v) => assert_ne!(v, b"hello world hello!"),-        Err(_) => {}+    if let Ok(v) = crypto::aes_cbc_decrypt(&[0u8; 32], &iv, &ct) {+        assert_ne!(v, b"hello world hello!");     } } @@ -176,7 +175,7 @@ fn protobuf_varint_boundaries_and_unknown_fields() {         let mut r = PbReader::new(&w.buf);         match r.next_field().unwrap() {             Some((7, PbValue::Varint(got))) => assert_eq!(got, v as u64),-            other => panic!("unexpected field for {v}: {:?}", matches!(other, Some(_))),+            other => panic!("unexpected field for {v}: {:?}", other.is_some()),         }         assert!(r.next_field().unwrap().is_none());     }