mirror of
https://github.com/logos-messaging/logos-messaging-rust-bindings.git
synced 2026-01-03 22:43:07 +00:00
avoid clippy errors
This commit is contained in:
parent
863f2081f0
commit
1052dca876
@ -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
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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::*;
|
||||
|
||||
@ -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>,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user