diff --git a/nomos-core/src/wire.rs b/nomos-core/src/wire.rs index 962f1a5c..12077205 100644 --- a/nomos-core/src/wire.rs +++ b/nomos-core/src/wire.rs @@ -113,7 +113,7 @@ mod tests { fn ser_de() { let tmp = String::from("much wow, very cool"); let mut buf = Vec::new(); - let _ = serializer(&mut buf).serialize_into(&tmp).unwrap(); + serializer(&mut buf).serialize_into(&tmp).unwrap(); let deserialized = deserializer(&buf).deserialize::().unwrap(); assert_eq!(tmp, deserialized); } @@ -122,7 +122,7 @@ mod tests { fn ser_de_slice() { let tmp = String::from("much wow, very cool"); let mut buf = vec![0; 1024]; - let _ = serializer_into_buffer(&mut buf) + serializer_into_buffer(&mut buf) .serialize_into(&tmp) .unwrap(); let deserialized = deserializer(&buf).deserialize::().unwrap(); diff --git a/nomos-services/http/examples/axum.rs b/nomos-services/http/examples/axum.rs index ec71fb84..cd5f20a0 100644 --- a/nomos-services/http/examples/axum.rs +++ b/nomos-services/http/examples/axum.rs @@ -94,7 +94,7 @@ where .unwrap(); let value = receiver.await.unwrap(); res_tx - .send(format!("Hello, world! {}", value).into()) + .send(format!("Hello, world! {value}").into()) .await .unwrap(); } diff --git a/nomos-services/http/src/http.rs b/nomos-services/http/src/http.rs index 9260a5b2..1a44364c 100644 --- a/nomos-services/http/src/http.rs +++ b/nomos-services/http/src/http.rs @@ -108,8 +108,7 @@ impl Debug for HttpMsg { req_stream: _, } => write!( fmt, - "HttpMsg::AddHandler {{ sender: {:?}, route: {:?} }}", - service_id, route + "HttpMsg::AddHandler {{ sender: {service_id:?}, route: {route:?} }}" ), } } diff --git a/nomos-services/log/src/lib.rs b/nomos-services/log/src/lib.rs index 0b8c9e8d..cb8f13da 100644 --- a/nomos-services/log/src/lib.rs +++ b/nomos-services/log/src/lib.rs @@ -118,7 +118,7 @@ mod serde_level { { ::deserialize(deserializer).and_then(|v| { v.parse() - .map_err(|e| D::Error::custom(format!("invalid log level {}", e))) + .map_err(|e| D::Error::custom(format!("invalid log level {e}"))) }) } diff --git a/nomos-services/mempool/src/lib.rs b/nomos-services/mempool/src/lib.rs index 060130be..2887da40 100644 --- a/nomos-services/mempool/src/lib.rs +++ b/nomos-services/mempool/src/lib.rs @@ -61,19 +61,14 @@ impl Debug for MempoolMsg { fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> { match self { Self::View { ancestor_hint, .. } => { - write!( - f, - "MempoolMsg::View {{ ancestor_hint: {:?}}}", - ancestor_hint - ) + write!(f, "MempoolMsg::View {{ ancestor_hint: {ancestor_hint:?}}}") } - Self::AddTx { tx } => write!(f, "MempoolMsg::AddTx{{tx: {:?}}}", tx), - Self::Prune { ids } => write!(f, "MempoolMsg::Prune{{ids: {:?}}}", ids), + Self::AddTx { tx } => write!(f, "MempoolMsg::AddTx{{tx: {tx:?}}}"), + Self::Prune { ids } => write!(f, "MempoolMsg::Prune{{ids: {ids:?}}}"), Self::MarkInBlock { ids, block } => { write!( f, - "MempoolMsg::MarkInBlock{{ids: {:?}, block: {:?}}}", - ids, block + "MempoolMsg::MarkInBlock{{ids: {ids:?}, block: {block:?}}}" ) } Self::Metrics { .. } => write!(f, "MempoolMsg::Metrics"), diff --git a/nomos-services/mempool/src/network/adapters/waku.rs b/nomos-services/mempool/src/network/adapters/waku.rs index a7a10894..50cbb123 100644 --- a/nomos-services/mempool/src/network/adapters/waku.rs +++ b/nomos-services/mempool/src/network/adapters/waku.rs @@ -45,10 +45,7 @@ where { // We panic, but as we could try to reconnect later it should not be // a problem. But definitely something to consider. - panic!( - "Couldn't send subscribe message to the network service: {}", - e - ); + panic!("Couldn't send subscribe message to the network service: {e}"); }; Self { network_relay, diff --git a/nomos-services/network/src/lib.rs b/nomos-services/network/src/lib.rs index a406cc84..c2670cad 100644 --- a/nomos-services/network/src/lib.rs +++ b/nomos-services/network/src/lib.rs @@ -27,11 +27,10 @@ pub enum NetworkMsg { impl Debug for NetworkMsg { fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { match self { - Self::Process(msg) => write!(fmt, "NetworkMsg::Process({:?})", msg), + Self::Process(msg) => write!(fmt, "NetworkMsg::Process({msg:?})"), Self::Subscribe { kind, sender } => write!( fmt, - "NetworkMsg::Subscribe{{ kind: {:?}, sender: {:?}}}", - kind, sender + "NetworkMsg::Subscribe{{ kind: {kind:?}, sender: {sender:?}}}" ), } }