Skip to content

Commit

Permalink
code: Expect clippy lints, and remove where unapplicable
Browse files Browse the repository at this point in the history
  • Loading branch information
felinira committed Jan 12, 2025
1 parent aaa9567 commit ade3808
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![allow(clippy::too_many_arguments)]
#![expect(clippy::too_many_arguments)]
mod completer;
mod util;

Expand Down
1 change: 0 additions & 1 deletion src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ pub struct WormholeWelcome {
* Maybe a better way to handle application level protocols is to create a trait for them and then
* to paramterize over them.
*/

/// A `MailboxConnection` contains a `RendezvousServer` which is connected to the mailbox
pub struct MailboxConnection<V: serde::Serialize + Send + Sync + 'static> {
/// A copy of `AppConfig`,
Expand Down
2 changes: 1 addition & 1 deletion src/core/server_messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl Nameplate_ {
Ok(value.into_iter().map(|value| Nameplate(value.id)).collect())
}

#[allow(clippy::all, dead_code)]
#[expect(clippy::all, dead_code)]
fn serialize<S>(value: &Vec<Nameplate>, ser: S) -> Result<S::Ok, S::Error>
where
S: serde::Serializer,
Expand Down
6 changes: 3 additions & 3 deletions src/forwarding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ impl ForwardingServe {
}
};
}
#[allow(clippy::while_let_loop)]
#[expect(clippy::while_let_loop)]
loop {
let read = break_on_err!(connection_rd.read(&mut buffer).await);
if read == 0 {
Expand Down Expand Up @@ -739,7 +739,7 @@ impl ConnectOffer {
}
}

#[allow(clippy::type_complexity)]
#[expect(clippy::type_complexity)]
struct ForwardConnect {
//transit: &'a mut transit::Transit,
/* when can I finally store an `impl Trait` in a struct? */
Expand Down Expand Up @@ -856,7 +856,7 @@ impl ForwardConnect {
}
};
}
#[allow(clippy::while_let_loop)]
#[expect(clippy::while_let_loop)]
loop {
let read = break_on_err!(connection_rd.read(&mut buffer).await);
if read == 0 {
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
//! might make use of it as well.
#![deny(unsafe_code)]
#![allow(clippy::upper_case_acronyms)]
#![allow(clippy::too_many_arguments)]
#![expect(clippy::too_many_arguments)]
#![allow(unused_macros)]
#![warn(missing_docs)]

Expand Down
1 change: 1 addition & 0 deletions src/transit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,7 @@ impl Transit {

/** Convert the transit connection to a [`Stream`]/[`Sink`] pair */
#[cfg(not(target_family = "wasm"))]
#[expect(clippy::type_complexity)]
pub fn split(
self,
) -> (
Expand Down

0 comments on commit ade3808

Please sign in to comment.