.cargo: Run clippy on ALL the source files (#2949)

This commit is contained in:
Thomas Eizinger
2022-10-04 18:24:38 +11:00
committed by GitHub
parent e6da99e4f8
commit 1b793242e6
50 changed files with 5497 additions and 5657 deletions

View File

@@ -307,9 +307,9 @@ mod tests {
use super::*;
use quickcheck::*;
const KEY1: &'static [u8] = include_bytes!("test/rsa-2048.pk8");
const KEY2: &'static [u8] = include_bytes!("test/rsa-3072.pk8");
const KEY3: &'static [u8] = include_bytes!("test/rsa-4096.pk8");
const KEY1: &[u8] = include_bytes!("test/rsa-2048.pk8");
const KEY2: &[u8] = include_bytes!("test/rsa-3072.pk8");
const KEY3: &[u8] = include_bytes!("test/rsa-4096.pk8");
#[derive(Clone, Debug)]
struct SomeKeypair(Keypair);

View File

@@ -286,10 +286,10 @@ mod tests {
#[test]
fn extract_peer_id_from_multi_address() {
let address =
format!("/memory/1234/p2p/12D3KooWGQmdpzHXCqLno4mMxWXKNFQHASBeF99gTm2JR8Vu5Bdc")
.parse()
.unwrap();
let address = "/memory/1234/p2p/12D3KooWGQmdpzHXCqLno4mMxWXKNFQHASBeF99gTm2JR8Vu5Bdc"
.to_string()
.parse()
.unwrap();
let peer_id = PeerId::try_from_multiaddr(&address).unwrap();
@@ -303,7 +303,7 @@ mod tests {
#[test]
fn no_panic_on_extract_peer_id_from_multi_address_if_not_present() {
let address = format!("/memory/1234").parse().unwrap();
let address = "/memory/1234".to_string().parse().unwrap();
let maybe_empty = PeerId::try_from_multiaddr(&address);