Skip to content

Commit

Permalink
Fix feature = "cargo-clippy" deprecation (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 authored Mar 5, 2024
1 parent 4c4ccbc commit 6a2b527
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion examples/handlers/stateful/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! An example of using stateful handlers with the Gotahm web framework.
#![cfg_attr(feature = "cargo-clippy", allow(clippy::mutex_atomic))]
#![allow(clippy::mutex_atomic)]

use futures_util::future::{self, FutureExt};
use std::pin::Pin;
Expand Down
2 changes: 1 addition & 1 deletion examples/shared_state/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! used across server threads, and be used to track the number of
//! requests sent to the backend.
#![cfg_attr(feature = "cargo-clippy", allow(clippy::mutex_atomic))]
#![allow(clippy::mutex_atomic)]

use gotham::middleware::state::StateMiddleware;
use gotham::pipeline::{single_middleware, single_pipeline};
Expand Down
23 changes: 10 additions & 13 deletions gotham/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@
#![warn(deprecated, missing_docs, unreachable_pub)]
// Stricter requirements once we get to pull request stage, all warnings must be resolved.
#![cfg_attr(feature = "ci", deny(warnings))]
#![cfg_attr(
feature = "cargo-clippy",
allow(
clippy::needless_lifetimes,
clippy::should_implement_trait,
clippy::unit_arg,
clippy::match_wild_err_arm,
clippy::new_without_default,
clippy::wrong_self_convention,
clippy::mutex_atomic,
clippy::borrowed_box,
clippy::get_unwrap,
)
#![allow(
clippy::needless_lifetimes,
clippy::should_implement_trait,
clippy::unit_arg,
clippy::match_wild_err_arm,
clippy::new_without_default,
clippy::wrong_self_convention,
clippy::mutex_atomic,
clippy::borrowed_box,
clippy::get_unwrap
)]
#![doc(test(no_crate_inject, attr(deny(warnings))))]
// TODO: Remove this when it's a hard error by default (error E0446).
Expand Down
2 changes: 1 addition & 1 deletion middleware/jwt/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ mod tests {
exp: usize,
}

#[cfg_attr(feature = "cargo-clippy", allow(clippy::match_wild_err_arm))]
#[allow(clippy::match_wild_err_arm)]
fn token(alg: Algorithm) -> String {
let claims = &Claims {
sub: "[email protected]".to_owned(),
Expand Down
2 changes: 1 addition & 1 deletion misc/borrow_bag/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#![warn(missing_docs, deprecated)]
// Stricter requirements once we get to pull request stage, all warnings must be resolved.
#![cfg_attr(feature = "ci", deny(warnings))]
#![cfg_attr(feature = "cargo-clippy", allow(clippy::should_implement_trait))]
#![allow(clippy::should_implement_trait)]
#![doc(test(attr(deny(warnings))))]
// TODO: Remove this when it's a hard error by default (error E0446).
// See Rust issue #34537 <https://github.com/rust-lang/rust/issues/34537>
Expand Down

0 comments on commit 6a2b527

Please sign in to comment.