fix(clippy): clippy warnings in tests

This commit is contained in:
Corentin LIAUD
2025-12-27 10:05:52 +01:00
parent 8e89aa0d6e
commit 0e24117678
2 changed files with 3 additions and 2 deletions

View File

@@ -126,7 +126,7 @@ fn set_bit(n: usize) -> Result<BigUint> {
#[test]
fn test_pubkey_gen() {
const DEFAULT_PRIV_KEY: &'static str = r"-----BEGIN PRIVATE KEY-----
const DEFAULT_PRIV_KEY: &str = r"-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC4Dyn85cxDJnjM
uYXQl/w469MDKdlGdviLfmFMWeYLVfL2Mz1AVyvKqscrtlhbbgMQ/M+3lDvEdHS0
14RIGAwWRtrlTTmhLvM2/IO+eSKSYeCrCVc4KLG3E3WRryUXbs2ynA29xjTJVw+Z

View File

@@ -107,6 +107,7 @@ fn test_static_devices_long() {
"QQ20131020250511 device 20-4 product:NOH-AN00 model:NOH_AN00 device:HWNOH transport_id:3",
];
for input in inputs {
DeviceLong::try_from(input.as_bytes()).expect(&format!("cannot parse input: '{input}'"));
DeviceLong::try_from(input.as_bytes())
.unwrap_or_else(|_| panic!("cannot parse input: '{input}'"));
}
}