Skip to content

Commit

Permalink
chore: re-enable blocks_in_conditions lint
Browse files Browse the repository at this point in the history
Clippy issue rust-lang/rust-clippy#12281 was fixed
in v1.81. We now have MSRV of 1.82 allowing us to remove our workaround.

More specifically, #[async_trait] was triggering this lint, and as of 1.81 no
longer does.
  • Loading branch information
Mirko-von-Leipzig committed Nov 2, 2024
1 parent f541610 commit 7952fea
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 30 deletions.
6 changes: 0 additions & 6 deletions crates/block-producer/src/batch_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,6 @@ pub struct DefaultBatchBuilder<S, BB> {
ready_batches: SharedRwVec<TransactionBatch>,
}

// FIXME: remove the allow when the upstream clippy issue is fixed:
// https://github.com/rust-lang/rust-clippy/issues/12281
#[allow(clippy::blocks_in_conditions)]
impl<S, BB> DefaultBatchBuilder<S, BB>
where
S: Store,
Expand Down Expand Up @@ -146,9 +143,6 @@ where
}
}

// FIXME: remove the allow when the upstream clippy issue is fixed:
// https://github.com/rust-lang/rust-clippy/issues/12281
#[allow(clippy::blocks_in_conditions)]
#[async_trait]
impl<S, BB> BatchBuilder for DefaultBatchBuilder<S, BB>
where
Expand Down
3 changes: 0 additions & 3 deletions crates/block-producer/src/block_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ where
}
}

// FIXME: remove the allow when the upstream clippy issue is fixed:
// https://github.com/rust-lang/rust-clippy/issues/12281
#[allow(clippy::blocks_in_conditions)]
#[async_trait]
impl<S, A> BlockBuilder for DefaultBlockBuilder<S, A>
where
Expand Down
3 changes: 0 additions & 3 deletions crates/block-producer/src/server/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ impl<BB, TV> BlockProducerApi<BB, TV> {
}
}

// FIXME: remove the allow when the upstream clippy issue is fixed:
// https://github.com/rust-lang/rust-clippy/issues/12281
#[allow(clippy::blocks_in_conditions)]
#[tonic::async_trait]
impl<BB, TV> api_server::Api for BlockProducerApi<BB, TV>
where
Expand Down
6 changes: 0 additions & 6 deletions crates/block-producer/src/state_view/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ where
}
}

// FIXME: remove the allow when the upstream clippy issue is fixed:
// https://github.com/rust-lang/rust-clippy/issues/12281
#[allow(clippy::blocks_in_conditions)]
#[async_trait]
impl<S> TransactionValidator for DefaultStateView<S>
where
Expand Down Expand Up @@ -136,9 +133,6 @@ where
}
}

// FIXME: remove the allow when the upstream clippy issue is fixed:
// https://github.com/rust-lang/rust-clippy/issues/12281
#[allow(clippy::blocks_in_conditions)]
#[async_trait]
impl<S> ApplyBlock for DefaultStateView<S>
where
Expand Down
6 changes: 0 additions & 6 deletions crates/block-producer/src/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ impl DefaultStore {
}
}

// FIXME: remove the allow when the upstream clippy issue is fixed:
// https://github.com/rust-lang/rust-clippy/issues/12281
#[allow(clippy::blocks_in_conditions)]
#[async_trait]
impl ApplyBlock for DefaultStore {
#[instrument(target = "miden-block-producer", skip_all, err)]
Expand All @@ -185,9 +182,6 @@ impl ApplyBlock for DefaultStore {
}
}

// FIXME: remove the allow when the upstream clippy issue is fixed:
// https://github.com/rust-lang/rust-clippy/issues/12281
#[allow(clippy::blocks_in_conditions)]
#[async_trait]
impl Store for DefaultStore {
#[instrument(target = "miden-block-producer", skip_all, err)]
Expand Down
3 changes: 0 additions & 3 deletions crates/rpc/src/server/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ impl RpcApi {
}
}

// FIXME: remove the allow when the upstream clippy issue is fixed:
// https://github.com/rust-lang/rust-clippy/issues/12281
#[allow(clippy::blocks_in_conditions)]
#[tonic::async_trait]
impl api_server::Api for RpcApi {
#[instrument(
Expand Down
3 changes: 0 additions & 3 deletions crates/store/src/server/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ pub struct StoreApi {
pub(super) state: Arc<State>,
}

// FIXME: remove the allow when the upstream clippy issue is fixed:
// https://github.com/rust-lang/rust-clippy/issues/12281
#[allow(clippy::blocks_in_conditions)]
#[tonic::async_trait]
impl api_server::Api for StoreApi {
// CLIENT ENDPOINTS
Expand Down

0 comments on commit 7952fea

Please sign in to comment.