From 08bb09b761b8dbb14f13d2d262936b2352dc2cd1 Mon Sep 17 00:00:00 2001 From: Pravdyvy <46261001+Pravdyvy@users.noreply.github.com> Date: Mon, 10 Aug 2026 11:50:03 +0300 Subject: [PATCH] Apply Daniil suggestions from code review Co-authored-by: Daniil Polyakov --- test_fixtures/src/config.rs | 4 ++-- test_fixtures/src/lib.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test_fixtures/src/config.rs b/test_fixtures/src/config.rs index cf4e7d842..a89671143 100644 --- a/test_fixtures/src/config.rs +++ b/test_fixtures/src/config.rs @@ -297,8 +297,8 @@ pub fn bedrock_channel_id_b() -> ChannelId { ChannelId::from(channel_id) } -#[must_use] /// Generate sequencer signing key from `u32` number via repeating le bytes 8 times. +#[must_use] pub fn sequencer_signing_key_from_seed(seed: u32) -> [u8; 32] { seed.to_le_bytes() .repeat(8) @@ -306,11 +306,11 @@ pub fn sequencer_signing_key_from_seed(seed: u32) -> [u8; 32] { .unwrap_or_else(|_| unreachable!()) } -#[must_use] /// Generate bedrock channel id from `u32` number via repeating le bytes 8 times. /// /// Counting from the end of `u32` to guarantee, that it is different from /// `sequencer_signing_key_from_seed`. +#[must_use] pub fn bedrock_channel_id_from_seed(seed: u32) -> ChannelId { let channel_id: [u8; 32] = // Useless in this case, but will make clippy happy diff --git a/test_fixtures/src/lib.rs b/test_fixtures/src/lib.rs index 721955bf5..d1aafa2f6 100644 --- a/test_fixtures/src/lib.rs +++ b/test_fixtures/src/lib.rs @@ -125,7 +125,7 @@ impl TestContext { /// Get a builder for the test context to customize its configuration. #[must_use] - pub fn builder(configs: Vec) -> MultiZoneTestContextBuilder { + pub fn builder(configs: impl IntoIterator) -> MultiZoneTestContextBuilder { MultiZoneTestContextBuilder { zone_builders: configs .into_iter() @@ -173,9 +173,9 @@ impl TestContext { .map(|zone| zone.sequencers.iter()) } - #[must_use] /// Reference for the default sequencer component for a zone (in case, if only one sequencer /// exists). + #[must_use] pub fn zone_default_sequencer_component(&self, channel_id: ChannelId) -> &SequencerComponents { self.sequencer_components_iter(channel_id) .unwrap()