aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWill Dillon <william@housedillon.com>2025-11-08 13:40:47 +0000
committerWill Dillon <william@housedillon.com>2025-11-08 13:40:47 +0000
commit6b1d8e85e21ce38f1f85ce7963d850c7b7397a6d (patch)
treeed378bdffc127475f66fa63f3eebd0bbae0cc22a /src
parentPrepare for publication (diff)
downloadmeshcore-rs-6b1d8e85e21ce38f1f85ce7963d850c7b7397a6d.tar.gz
meshcore-rs-6b1d8e85e21ce38f1f85ce7963d850c7b7397a6d.zip
Squelch some warnings
Diffstat (limited to 'src')
-rw-r--r--src/identity.rs6
-rw-r--r--src/packet.rs4
-rw-r--r--src/packet_content.rs4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/identity.rs b/src/identity.rs
index 49934fc..6e0e252 100644
--- a/src/identity.rs
+++ b/src/identity.rs
@@ -78,7 +78,7 @@ pub struct Keystore {
}
impl Keystore {
- pub fn decrypt_and_id_p2p(&self, source: u8, dest: u8, mac: u16, data: &Bytes) -> Option<(Bytes, Rc<String>, Rc<String>)> {
+ pub fn decrypt_and_id_p2p(&self, _source: u8, _dest: u8, mac: u16, data: &Bytes) -> Option<(Bytes, Rc<String>, Rc<String>)> {
// Just brute-force all the secrets until one matches...
for identity in self.identities.iter() {
for secret in identity.1.secrets.iter() {
@@ -91,7 +91,7 @@ impl Keystore {
None
}
- pub fn decrypt_and_id_group(&self, group_hash_prefix: u8, mac: u16, data: &Bytes) -> Option<(Bytes, &Group)> {
+ pub fn decrypt_and_id_group(&self, _group_hash_prefix: u8, mac: u16, data: &Bytes) -> Option<(Bytes, &Group)> {
for group in self.groups.iter() {
// if group.1.secret.hash_prefix() == group_hash_prefix {
let result = group.1.secret.mac_then_decrypt(mac, data);
@@ -104,7 +104,7 @@ impl Keystore {
None
}
- pub fn decrypt_anon(&self, dest: u8, pub_key: &PublicKey, mac: u16, data: &Bytes) -> Option<(Bytes, Identity)> {
+ pub fn decrypt_anon(&self, _dest: u8, _pub_key: &PublicKey, _mac: u16, _data: &Bytes) -> Option<(Bytes, Identity)> {
None
}
}
diff --git a/src/packet.rs b/src/packet.rs
index 6ea1586..ef10fe9 100644
--- a/src/packet.rs
+++ b/src/packet.rs
@@ -3,7 +3,7 @@ use std::{fmt::{Debug, Display}, str::FromStr};
use hex::decode;
use tokio_util::bytes::{Buf, Bytes};
use structdiff::{Difference, StructDiff};
-use crate::{crypto::SharedSecret, identity::Keystore, packet_content::{ClearText, PacketContent}};
+use crate::{identity::Keystore, packet_content::{ClearText, PacketContent}};
#[derive(PartialEq, Debug, Clone, Difference)]
#[difference(expose)]
@@ -195,7 +195,7 @@ impl Packet {
&anon_req.ciphertext
);
- if let Some(cleartext) = decrypt_reault {
+ if let Some(_cleartext) = decrypt_reault {
true
} else {
false
diff --git a/src/packet_content.rs b/src/packet_content.rs
index ffdd642..cd5e778 100644
--- a/src/packet_content.rs
+++ b/src/packet_content.rs
@@ -183,7 +183,7 @@ impl Display for Request {
self.cipher.mac
))?;
- if let Some(cleartext) = &self.cipher.cleartext {
+ if let Some(_cleartext) = &self.cipher.cleartext {
f.write_fmt(format_args!("TODO"))
} else {
f.write_str("ENCRYPTED")
@@ -213,7 +213,7 @@ impl Display for Response {
self.cipher.mac
))?;
- if let Some(cleartext) = &self.cipher.cleartext {
+ if let Some(_cleartext) = &self.cipher.cleartext {
f.write_fmt(format_args!(""))
} else {
f.write_str("ENCRYPTED")