Skip to content

Commit 23be55b

Browse files
committed
fix: lint
1 parent 6341957 commit 23be55b

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

crates/codec/src/decoding/v0/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ pub(crate) use block_context::BlockContextV0;
77
mod block_context;
88

99
use crate::{
10-
L2Block,
1110
decoding::{batch::Batch, payload::PayloadData, transaction::Transaction},
1211
error::DecodingError,
12+
L2Block,
1313
};
1414
use std::vec::Vec;
1515

@@ -71,9 +71,9 @@ pub fn decode_v0(calldata: &[u8]) -> Result<Batch, DecodingError> {
7171
#[cfg(test)]
7272
mod tests {
7373
use super::*;
74-
use crate::{BlockContext, decoding::test_utils::read_to_bytes};
74+
use crate::{decoding::test_utils::read_to_bytes, BlockContext};
7575

76-
use alloy_primitives::{U256, bytes};
76+
use alloy_primitives::{bytes, U256};
7777

7878
#[test]
7979
fn test_should_decode_v0() -> eyre::Result<()> {

crates/codec/src/decoding/v1/mod.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,12 @@ pub use batch_header::BatchHeaderV1;
22
mod batch_header;
33

44
use crate::{
5-
L2Block, check_buf_len,
65
decoding::{
76
batch::Batch, blob::BlobSliceIter, payload::PayloadData, transaction::Transaction,
87
v0::BlockContextV0,
98
},
109
error::DecodingError,
11-
from_be_bytes_slice_and_advance_buf,
10+
from_be_bytes_slice_and_advance_buf, L2Block,
1211
};
1312
use std::vec::Vec;
1413

@@ -108,9 +107,9 @@ pub(crate) fn decode_v1_chunk(
108107
#[cfg(test)]
109108
mod tests {
110109
use super::*;
111-
use crate::{BlockContext, decoding::test_utils::read_to_bytes};
110+
use crate::{decoding::test_utils::read_to_bytes, BlockContext};
112111

113-
use alloy_primitives::{U256, bytes};
112+
use alloy_primitives::{bytes, U256};
114113

115114
#[test]
116115
fn test_should_decode_v1() -> eyre::Result<()> {

crates/codec/src/decoding/v2/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::{
55
decoding::{
66
batch::Batch,
77
blob::BlobSliceIter,
8-
v1::{BatchHeaderV1, decode_v1_chunk},
8+
v1::{decode_v1_chunk, BatchHeaderV1},
99
v2::zstd::decompress_blob_data,
1010
},
1111
error::DecodingError,
@@ -57,9 +57,9 @@ pub fn decode_v2(calldata: &[u8], blob: &[u8]) -> Result<Batch, DecodingError> {
5757
#[cfg(test)]
5858
mod tests {
5959
use super::*;
60-
use crate::{BlockContext, L2Block, decoding::test_utils::read_to_bytes};
60+
use crate::{decoding::test_utils::read_to_bytes, BlockContext, L2Block};
6161

62-
use alloy_primitives::{U256, bytes};
62+
use alloy_primitives::{bytes, U256};
6363

6464
#[test]
6565
fn test_should_decode_v2() -> eyre::Result<()> {

crates/codec/src/decoding/v4/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ pub fn decode_v4(calldata: &[u8], blob: &[u8]) -> Result<Batch, DecodingError> {
5353
#[cfg(test)]
5454
mod tests {
5555
use super::*;
56-
use crate::{BlockContext, L2Block, decoding::test_utils::read_to_bytes};
56+
use crate::{decoding::test_utils::read_to_bytes, BlockContext, L2Block};
5757

58-
use alloy_primitives::{U256, bytes};
58+
use alloy_primitives::{bytes, U256};
5959

6060
#[test]
6161
fn test_should_decode_v4_uncompressed() -> eyre::Result<()> {

crates/codec/src/decoding/v7/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ pub(crate) use block_context::BlockContextV7;
55
mod block_context;
66

77
use crate::{
8-
L2Block, check_buf_len,
8+
check_buf_len,
99
decoding::{
1010
batch::Batch, blob::BlobSliceIter, payload::PayloadData, transaction::Transaction,
1111
v2::zstd::decompress_blob_data,
1212
},
1313
error::DecodingError,
14-
from_be_bytes_slice_and_advance_buf,
14+
from_be_bytes_slice_and_advance_buf, L2Block,
1515
};
1616
use std::vec::Vec;
1717

18-
use alloy_primitives::{B256, bytes::Buf};
18+
use alloy_primitives::{bytes::Buf, B256};
1919

2020
/// The offset in the blob to the payload envelope.
2121
const BLOB_ENVELOPE_V7_OFFSET_PAYLOAD: usize = 5;
@@ -105,9 +105,9 @@ pub(crate) fn decode_v7_payload(blob: &[u8]) -> Result<Batch, DecodingError> {
105105
#[cfg(test)]
106106
mod tests {
107107
use super::*;
108-
use crate::{BlockContext, decoding::test_utils::read_to_bytes};
108+
use crate::{decoding::test_utils::read_to_bytes, BlockContext};
109109

110-
use alloy_primitives::{U256, bytes};
110+
use alloy_primitives::{bytes, U256};
111111

112112
#[test]
113113
fn test_should_decode_v7_uncompressed() -> eyre::Result<()> {

0 commit comments

Comments
 (0)