name: cargo doc

on:
  workflow_call:

jobs:
  doc:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
        with:
          shared-key: ubuntu-latest-stable
          save-if: false
      - run: cargo doc --no-deps --features "parallel,serde"
        env:
          RUSTDOCFLAGS: -Dwarnings
