avoid clippy errors

This commit is contained in:
Ivan Folgueira Bande 2024-12-23 10:47:01 +01:00
parent 863f2081f0
commit 1052dca876
No known key found for this signature in database
GPG Key ID: 3C117481F89E24A7
3 changed files with 7 additions and 3 deletions

View File

@ -1,4 +1,5 @@
use crate::general::waku_decode::WakuDecode;
use std::fmt::Write;
use hex::FromHex;
use serde::{Deserialize, Deserializer, Serialize};
use std::convert::TryInto;
@ -12,8 +13,10 @@ pub struct MessageHash([u8; 32]);
impl MessageHash {
fn to_hex_string(&self) -> String {
let hex: String = self.0.iter().map(|b| format!("{:02x}", b)).collect();
format!("0x{}", hex)
self.0.iter().fold(String::new(), |mut output, b| {
let _ = write!(output, "{b:02X}");
output
})
}
}

View File

@ -37,7 +37,7 @@ where
macro_rules! handle_ffi_call {
// Case: With or without additional arguments
($waku_fn:expr, $resp_hndlr:expr, $ctx:expr $(, $($arg:expr),*)?) => {{
use crate::macros::get_trampoline;
use $crate::macros::get_trampoline;
use std::sync::Arc;
use tokio::sync::Notify;
use libc::*;

View File

@ -170,6 +170,7 @@ impl WakuNodeHandle<Running> {
lightpush::waku_lightpush_publish_message(&self.ctx, message, pubsub_topic).await
}
#[allow(clippy::too_many_arguments)]
pub async fn store_query(
&self,
pubsub_topic: Option<PubsubTopic>,