name: cargo clippy

on:
  workflow_call:

jobs:
  clippy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@v2
        with:
          shared-key: ubuntu-latest-stable
          save-if: false
      - run: cargo clippy --all-targets --features "parallel,serde" -- -D warnings
