mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-08-01 01:11:58 +00:00
.cargo: Run clippy
on ALL the source files (#2949)
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user