Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
satisfy clippy again
Browse files Browse the repository at this point in the history
  • Loading branch information
chunningham committed Apr 6, 2023
1 parent 6f4e0b5 commit 622e92f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 48 deletions.
45 changes: 0 additions & 45 deletions src/p2p/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,49 +273,4 @@ mod test {

assert_eq!(listened, vec![addr]);
}

#[test]
async fn can_relay() {
let mut alice = Config::default()
.launch(Keypair::generate_ed25519(), MemoryConfig)
.unwrap();

let mut bob = Config::default()
.launch(
Keypair::generate_ed25519(),
Both::<MemoryConfig, TcpConfig>::default(),
)
.unwrap();

let mut charles = Config::default()
.launch(
Keypair::generate_ed25519(),
Both::<MemoryConfig, TcpConfig>::default(),
)
.unwrap();

alice
.listen_on([build_multiaddr!(Memory(0u8))])
.await
.unwrap();

bob.listen_on([build_multiaddr!(Memory(0u8))])
.await
.unwrap();

charles
.listen_on([build_multiaddr!(Tcp(0u8))])
.await
.unwrap();

let alice_addrs = alice.get_addresses().await.unwrap();
let bob_addrs = bob.get_addresses().await.unwrap();
let charles_addrs = charles.get_addresses().await.unwrap();

let charles_via_bob = bob_addrs[0].clone().with(Protocol::P2p(bob.id().into()));

let charles_via_bob = charles_addrs[0].with(Protocol::P2p(bob.id().into()));

alice.dial().await.unwrap();
}
}
4 changes: 2 additions & 2 deletions src/storage/s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ impl ProviderUtils for S3BlockConfig {
.await
{
Ok(o) => Ok(Keypair::from_protobuf_encoding(
&o.body.collect().await?.into_bytes().to_vec(),
&o.body.collect().await?.into_bytes(),
)?),
Err(SdkError::ServiceError {
err:
Expand Down Expand Up @@ -132,7 +132,7 @@ impl ProviderUtils for S3BlockConfig {
.await
{
Ok(o) => Ok(Some(Keypair::from_protobuf_encoding(
&o.body.collect().await?.into_bytes().to_vec(),
&o.body.collect().await?.into_bytes(),
)?)),
Err(SdkError::ServiceError {
err:
Expand Down
1 change: 0 additions & 1 deletion src/storage/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ macro_rules! write_with_multihash {
let (mut h, b) = hb.into_inner();
Ok((Code::$hashes.wrap(h.finalize())?, b))
},)*
_ => Err(MultihashError::UnsupportedCode($code.into())),
}
};
}
Expand Down

0 comments on commit 622e92f

Please sign in to comment.