Skip to content

Commit

Permalink
code: Expect some more lints
Browse files Browse the repository at this point in the history
  • Loading branch information
felinira committed Jan 12, 2025
1 parent 740d4fa commit 01420df
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 11 deletions.
1 change: 0 additions & 1 deletion cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ async fn main() -> eyre::Result<()> {
))
.await?;
},
#[allow(unused_variables)]
WormholeCommand::SendMany {
tries,
timeout,
Expand Down
2 changes: 1 addition & 1 deletion src/core/rendezvous.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ impl std::fmt::Debug for RendezvousServer {
}

#[expect(deprecated)]
#[allow(missing_docs)]
#[expect(missing_docs)]
impl RendezvousServer {
/**
* Connect to the rendezvous server
Expand Down
2 changes: 1 addition & 1 deletion src/core/test.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(irrefutable_let_patterns)]
#![expect(irrefutable_let_patterns)]

use super::{Mood, Phase};
use rand::Rng;
Expand Down
2 changes: 1 addition & 1 deletion src/core/wordlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl Wordlist {
.collect()
}

#[allow(unused)]
#[allow(dead_code)]
fn normal_complete(&self, partial: &str, words: &[String]) -> Vec<String> {
words
.iter()
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#![deny(unsafe_code)]
#![expect(clippy::too_many_arguments)]
#![allow(unused_macros)]
#![expect(unused_macros)]
#![warn(missing_docs)]

#[macro_use]
Expand Down
4 changes: 2 additions & 2 deletions src/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mod cancel;
pub mod offer;
mod v1;
#[cfg(feature = "experimental-transfer-v2")]
#[allow(missing_docs)]
#[expect(missing_docs)]
mod v2;

#[doc(hidden)]
Expand Down Expand Up @@ -270,7 +270,7 @@ pub enum PeerMessage {
}

impl PeerMessage {
#[allow(unused)]
#[allow(dead_code)]
fn offer_message_v1(msg: impl Into<String>) -> Self {
PeerMessage::Offer(v1::OfferMessage::Message(msg.into()))
}
Expand Down
4 changes: 1 addition & 3 deletions src/transfer/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ impl ReceiveRequest {
}

#[cfg(feature = "experimental-transfer-v2")]
#[allow(missing_docs)]
#[expect(missing_docs)]
pub fn offer(&self) -> Arc<Offer> {
self.offer.clone()
}
Expand Down Expand Up @@ -758,11 +758,9 @@ where
/// Custom functions from the `tar` crate to access internals
mod tar_helper {
/* Imports may depend on target platform */
#[allow(unused_imports)]
use std::{
borrow::Cow,
io::{self, Read, Write},
path::Path,
str,
};

Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl std::fmt::Display for DisplayBytes<'_> {
* TODO remove after https://github.com/quininer/memsec/issues/11 is resolved.
* Original implementation: https://github.com/jedisct1/libsodium/blob/6d566070b48efd2fa099bbe9822914455150aba9/src/libsodium/sodium/utils.c#L262-L307
*/
#[allow(unused)]
#[expect(unused)]
pub fn sodium_increment_le(n: &mut [u8]) {
let mut c = 1u16;
for b in n {
Expand Down

0 comments on commit 01420df

Please sign in to comment.