From c1a1852168622228cbefe892593541af7fd279ae Mon Sep 17 00:00:00 2001 From: mehmetkr-31 Date: Fri, 7 Aug 2026 00:04:15 +0300 Subject: [PATCH] chore(types): drop redundant macro imports that break CI on Rust 1.92 On Rust 1.92 the CI lint command cargo clippy --all-targets --all-features -- -D warnings fails on this crate with two `unused import: crate::codec::impl_versioned_codec` errors, so bumping rust-toolchain.toml past the pinned 1.91.1 breaks the Rust Lint job. `impl_versioned_codec` is a `macro_rules!` macro defined in `codec/mod.rs` above the `pub mod network;` / `pub mod wal;` declarations. Textual macro scoping already puts it in scope for both child modules, so the explicit `use` never did anything; 1.92 is simply the first release whose `unused_imports` lint reports it. Removing the two imports leaves the `pub(crate) use impl_versioned_codec;` re-export with no remaining users, and it warns in turn, so it goes as well. Nothing outside `codec` referenced the macro by path. This is a lint-visibility fix, not a behaviour change: textual scoping is long-stable and version-independent, so the macro resolves the same way on 1.91.1 and on 1.92. Co-Authored-By: Claude Opus 5 --- crates/types/src/codec/mod.rs | 2 -- crates/types/src/codec/network.rs | 1 - crates/types/src/codec/wal.rs | 1 - 3 files changed, 4 deletions(-) diff --git a/crates/types/src/codec/mod.rs b/crates/types/src/codec/mod.rs index 2489bdf6..365aee6f 100644 --- a/crates/types/src/codec/mod.rs +++ b/crates/types/src/codec/mod.rs @@ -77,8 +77,6 @@ macro_rules! impl_versioned_codec { }; } -pub(crate) use impl_versioned_codec; - pub mod error; pub mod network; pub mod proto; diff --git a/crates/types/src/codec/network.rs b/crates/types/src/codec/network.rs index 9b7b3d45..c9456a88 100644 --- a/crates/types/src/codec/network.rs +++ b/crates/types/src/codec/network.rs @@ -23,7 +23,6 @@ use malachitebft_core_types::ValidatorProof; use malachitebft_sync::{self as sync}; use crate::codec::error::CodecError; -use crate::codec::impl_versioned_codec; use crate::codec::proto::ProtobufCodec; use crate::codec::versions::{ LivenessMsgVersion, ProposalPartVersion, SignedConsensusMsgVersion, StreamMessageVersion, diff --git a/crates/types/src/codec/wal.rs b/crates/types/src/codec/wal.rs index 285d9f18..bd26eb69 100644 --- a/crates/types/src/codec/wal.rs +++ b/crates/types/src/codec/wal.rs @@ -19,7 +19,6 @@ use malachitebft_core_consensus::{ProposedValue, SignedConsensusMsg}; use malachitebft_core_types::PolkaCertificate; -use crate::codec::impl_versioned_codec; use crate::codec::versions::{ PolkaCertificateVersion, ProposedValueVersion, SignedConsensusMsgVersion, };