From acd551e64453ad38348862cd403f36e51a7dca3b Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Thu, 23 Jun 2022 13:49:16 +1000 Subject: [PATCH] Remove unnecessary 'static lifetime clippy emits a bunch of: warning: statics have by default a `'static` lifetime Remove the unnecessary 'static lifetimes. --- src/blockdata/transaction.rs | 2 +- src/util/key.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/blockdata/transaction.rs b/src/blockdata/transaction.rs index 7859d197..90b96bcf 100644 --- a/src/blockdata/transaction.rs +++ b/src/blockdata/transaction.rs @@ -1662,7 +1662,7 @@ mod benches { use crate::hashes::hex::FromHex; use test::{black_box, Bencher}; - const SOME_TX: &'static str = "0100000001a15d57094aa7a21a28cb20b59aab8fc7d1149a3bdbcddba9c622e4f5f6a99ece010000006c493046022100f93bb0e7d8db7bd46e40132d1f8242026e045f03a0efe71bbb8e3f475e970d790221009337cd7f1f929f00cc6ff01f03729b069a7c21b59b1736ddfee5db5946c5da8c0121033b9b137ee87d5a812d6f506efdd37f0affa7ffc310711c06c7f3e097c9447c52ffffffff0100e1f505000000001976a9140389035a9225b3839e2bbf32d826a1e222031fd888ac00000000"; + const SOME_TX: &str = "0100000001a15d57094aa7a21a28cb20b59aab8fc7d1149a3bdbcddba9c622e4f5f6a99ece010000006c493046022100f93bb0e7d8db7bd46e40132d1f8242026e045f03a0efe71bbb8e3f475e970d790221009337cd7f1f929f00cc6ff01f03729b069a7c21b59b1736ddfee5db5946c5da8c0121033b9b137ee87d5a812d6f506efdd37f0affa7ffc310711c06c7f3e097c9447c52ffffffff0100e1f505000000001976a9140389035a9225b3839e2bbf32d826a1e222031fd888ac00000000"; #[bench] pub fn bench_transaction_size(bh: &mut Bencher) { diff --git a/src/util/key.rs b/src/util/key.rs index bbb9e0ac..a2c6a860 100644 --- a/src/util/key.rs +++ b/src/util/key.rs @@ -550,9 +550,9 @@ mod tests { fn test_key_serde() { use serde_test::{Configure, Token, assert_tokens}; - static KEY_WIF: &'static str = "cVt4o7BGAig1UXywgGSmARhxMdzP5qvQsxKkSsc1XEkw3tDTQFpy"; - static PK_STR: &'static str = "039b6347398505f5ec93826dc61c19f47c66c0283ee9be980e29ce325a0f4679ef"; - static PK_STR_U: &'static str = "\ + static KEY_WIF: &str = "cVt4o7BGAig1UXywgGSmARhxMdzP5qvQsxKkSsc1XEkw3tDTQFpy"; + static PK_STR: &str = "039b6347398505f5ec93826dc61c19f47c66c0283ee9be980e29ce325a0f4679ef"; + static PK_STR_U: &str = "\ 04\ 9b6347398505f5ec93826dc61c19f47c66c0283ee9be980e29ce325a0f4679ef\ 87288ed73ce47fc4f5c79d19ebfa57da7cff3aff6e819e4ee971d86b5e61875d\