Remove explicit 'static lifetime
Clippy emits: warning: statics have by default a `'static` lifetime Static strings no longer need an explicit lifetime, remove it.
This commit is contained in:
parent
1a582db160
commit
35d59e7cc6
|
@ -272,9 +272,7 @@ mod tests {
|
|||
0xff, 0xff, 0, 0, 0xff, 0xff, 0, 0,
|
||||
99, 99, 99, 99, 99, 99, 99, 99
|
||||
];
|
||||
static STR: &'static str = "\
|
||||
01010101010101010001020304050607ffff0000ffff00006363636363636363\
|
||||
";
|
||||
static STR: &str = "01010101010101010001020304050607ffff0000ffff00006363636363636363";
|
||||
|
||||
let secret = SharedSecret::from_slice(&BYTES).unwrap();
|
||||
|
||||
|
|
13
src/key.rs
13
src/key.rs
|
@ -2108,9 +2108,8 @@ mod test {
|
|||
0xff, 0xff, 0, 0, 0xff, 0xff, 0, 0,
|
||||
99, 99, 99, 99, 99, 99, 99, 99
|
||||
];
|
||||
static SK_STR: &'static str = "\
|
||||
01010101010101010001020304050607ffff0000ffff00006363636363636363\
|
||||
";
|
||||
static SK_STR: &str = "01010101010101010001020304050607ffff0000ffff00006363636363636363";
|
||||
|
||||
#[cfg(fuzzing)]
|
||||
static PK_BYTES: [u8; 33] = [
|
||||
0x02,
|
||||
|
@ -2119,9 +2118,7 @@ mod test {
|
|||
0x06, 0x83, 0x7f, 0x30, 0xaa, 0x0c, 0xd0, 0x54,
|
||||
0x4a, 0xc8, 0x87, 0xfe, 0x91, 0xdd, 0xd1, 0x66,
|
||||
];
|
||||
static PK_STR: &'static str = "\
|
||||
0218845781f631c48f1c9709e23092067d06837f30aa0cd0544ac887fe91ddd166\
|
||||
";
|
||||
static PK_STR: &str = "0218845781f631c48f1c9709e23092067d06837f30aa0cd0544ac887fe91ddd166";
|
||||
|
||||
#[cfg(not(fuzzing))]
|
||||
let s = Secp256k1::new();
|
||||
|
@ -2238,9 +2235,7 @@ mod test {
|
|||
0xff, 0xff, 0, 0, 0xff, 0xff, 0, 0,
|
||||
99, 99, 99, 99, 99, 99, 99, 99
|
||||
];
|
||||
static SK_STR: &'static str = "\
|
||||
01010101010101010001020304050607ffff0000ffff00006363636363636363\
|
||||
";
|
||||
static SK_STR: &str = "01010101010101010001020304050607ffff0000ffff00006363636363636363";
|
||||
|
||||
let sk = KeyPairWrapper(KeyPair::from_seckey_slice(&crate::SECP256K1, &SK_BYTES).unwrap());
|
||||
assert_tokens(&sk.compact(), &[
|
||||
|
|
|
@ -1001,7 +1001,7 @@ mod tests {
|
|||
226, 108, 150, 124, 57, 38, 206, 112, 44, 249, 125, 75, 1, 0, 98, 225,
|
||||
147, 247, 99, 25, 15, 103, 118
|
||||
];
|
||||
static SIG_STR: &'static str = "\
|
||||
static SIG_STR: &str = "\
|
||||
30450221009d0bad576719d32ae76bedb34c774866673cbde3f4e12951555c9408e6ce77\
|
||||
4b02202876e7102f204f6bfee26c967c3926ce702cf97d4b010062e193f763190f6776\
|
||||
";
|
||||
|
|
|
@ -548,7 +548,7 @@ mod tests {
|
|||
0x9e, 0x4d, 0x4e, 0xf5, 0x67, 0x8a, 0xd0, 0xd9, 0xd5, 0x32, 0xc0, 0xdf, 0xa9, 0x07,
|
||||
0xb5, 0x68, 0x72, 0x2d, 0x0b, 0x01, 0x19, 0xba,
|
||||
];
|
||||
static SIG_STR: &'static str = "\
|
||||
static SIG_STR: &str = "\
|
||||
14d0bf1a8953506fb460f58be141af767fd112535fb3922ef217308e2c26706f1eeb432b3dba9a01082f9e4d4ef5678ad0d9d532c0dfa907b568722d0b0119ba\
|
||||
";
|
||||
|
||||
|
@ -556,9 +556,7 @@ mod tests {
|
|||
24, 132, 87, 129, 246, 49, 196, 143, 28, 151, 9, 226, 48, 146, 6, 125, 6, 131, 127,
|
||||
48, 170, 12, 208, 84, 74, 200, 135, 254, 145, 221, 209, 102
|
||||
];
|
||||
static PK_STR: &'static str = "\
|
||||
18845781f631c48f1c9709e23092067d06837f30aa0cd0544ac887fe91ddd166\
|
||||
";
|
||||
static PK_STR: &str = "18845781f631c48f1c9709e23092067d06837f30aa0cd0544ac887fe91ddd166";
|
||||
let pk = XOnlyPublicKey::from_slice(&PK_BYTES).unwrap();
|
||||
|
||||
assert_tokens(&sig.compact(), &[Token::BorrowedBytes(&SIG_BYTES[..])]);
|
||||
|
|
Loading…
Reference in New Issue