diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index e6183f4..5dcbb1d 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -33,6 +33,18 @@ jobs: - name: Build run: cargo build --verbose + fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.rust_min }} + components: rustfmt + - uses: Swatinem/rust-cache@v2 + - name: Format + run: cargo fmt --check + clippy: name: clippy runs-on: ubuntu-latest diff --git a/bitcoin-testscripts/src/u32mul.rs b/bitcoin-testscripts/src/u32mul.rs index d037949..2b5b03f 100644 --- a/bitcoin-testscripts/src/u32mul.rs +++ b/bitcoin-testscripts/src/u32mul.rs @@ -77,7 +77,11 @@ impl SplitableScript<{ INPUT_SIZE }, { OUTPUT_SIZE }> for U32MulScript { impl U32MulScript { /// Splits the script into shards with a given chunk size - pub fn split_with_chunk_size(input: Script, split_type: SplitType, chunk_size: usize) -> SplitResult { + pub fn split_with_chunk_size( + input: Script, + split_type: SplitType, + chunk_size: usize, + ) -> SplitResult { Self::split(input, split_type, chunk_size) } } @@ -134,7 +138,8 @@ mod tests { let IOPair { input, output } = U32MulScript::generate_valid_io_pair(); // Splitting the script into shards - let split_result = U32MulScript::split_with_chunk_size(input, SplitType::ByInstructions, SPLIT_SIZE); + let split_result = + U32MulScript::split_with_chunk_size(input, SplitType::ByInstructions, SPLIT_SIZE); for shard in split_result.shards.iter() { println!("Shard: {:?}", shard.len());