mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-30 18:21:33 +00:00
chore: Implement latest clippy warnings (#3220)
As I do frequently, I corrected for the latest clippy warnings. This will make sure the CI won't complain in the future. We could automate this btw and maybe run the nightly version of clippy.
This commit is contained in:
@ -50,7 +50,7 @@ impl Namespace {
|
||||
/// This will panic if the namespace is too long. We accepting panicking in this case because we are enforcing a `static lifetime which means this value can only be a constant in the program and hence we hope the developer checked that it is of an acceptable length.
|
||||
pub fn from_static(value: &'static str) -> Self {
|
||||
if value.len() > 255 {
|
||||
panic!("Namespace '{}' is too long!", value)
|
||||
panic!("Namespace '{value}' is too long!")
|
||||
}
|
||||
|
||||
Namespace(value.to_owned())
|
||||
|
@ -116,7 +116,7 @@ impl SubstreamHandler for Stream {
|
||||
Stream::PendingSend(substream, Message::DiscoverResponse(Err(error)))
|
||||
}
|
||||
(event, inbound) => {
|
||||
debug_assert!(false, "{:?} cannot handle event {:?}", inbound, event);
|
||||
debug_assert!(false, "{inbound:?} cannot handle event {event:?}");
|
||||
|
||||
inbound
|
||||
}
|
||||
|
Reference in New Issue
Block a user