Skip to content

Commit

Permalink
remove deprecated feature cargo-clippy (#547)
Browse files Browse the repository at this point in the history
Signed-off-by: glorv <glorvs@163.com>
  • Loading branch information
glorv authored May 13, 2024
1 parent 668bed2 commit 25b6676
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion benches/benches.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0.

#![allow(dead_code)] // Due to criterion we need this to avoid warnings.
#![cfg_attr(feature = "cargo-clippy", allow(clippy::let_and_return))] // Benches often artificially return values. Allow it.

use criterion::Criterion;
use std::time::Duration;
Expand Down
1 change: 0 additions & 1 deletion harness/tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0.

#![cfg_attr(not(feature = "cargo-clippy"), allow(unknown_lints))]
#![cfg_attr(feature = "failpoints", allow(dead_code, unused_imports))]
// We use `default` method a lot to be support prost and rust-protobuf at the
// same time. And reassignment can be optimized by compiler.
Expand Down
2 changes: 0 additions & 2 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ pub enum Error {
}

impl PartialEq for Error {
#[cfg_attr(feature = "cargo-clippy", allow(clippy::match_same_arms))]
fn eq(&self, other: &Error) -> bool {
match (self, other) {
(Error::StepPeerNotFound, Error::StepPeerNotFound) => true,
Expand Down Expand Up @@ -90,7 +89,6 @@ pub enum StorageError {
}

impl PartialEq for StorageError {
#[cfg_attr(feature = "cargo-clippy", allow(clippy::match_same_arms))]
fn eq(&self, other: &StorageError) -> bool {
matches!(
(self, other),
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,6 @@ before taking old, removed peers offline.
*/

#![cfg_attr(not(feature = "cargo-clippy"), allow(unknown_lints))]
#![deny(clippy::all)]
#![deny(missing_docs)]
#![recursion_limit = "128"]
Expand Down
1 change: 0 additions & 1 deletion src/raft.rs
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,6 @@ impl<T: Storage> Raft<T> {
self.bcast_heartbeat_with_ctx(ctx)
}

#[cfg_attr(feature = "cargo-clippy", allow(clippy::needless_pass_by_value))]
fn bcast_heartbeat_with_ctx(&mut self, ctx: Option<Vec<u8>>) {
let self_id = self.id;
let core = &mut self.r;
Expand Down
1 change: 0 additions & 1 deletion src/raw_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ impl<T: Storage> RawNode<T> {
/// If the node enters joint state with `auto_leave` set to true, it's
/// caller's responsibility to propose an empty conf change again to force
/// leaving joint state.
#[cfg_attr(feature = "cargo-clippy", allow(clippy::needless_pass_by_value))]
pub fn propose_conf_change(&mut self, context: Vec<u8>, cc: impl ConfChangeI) -> Result<()> {
let (data, ty) = if let Some(cc) = cc.as_v1() {
(cc.write_to_bytes()?, EntryType::EntryConfChange)
Expand Down

0 comments on commit 25b6676

Please sign in to comment.