bit_ops 0.2.3

Common bit-oriented operations on primitive integer types with a focus on `no_std` and `const` compatibility. Unlike other crates that provide tooling to create sophisticated high-level types with bitfields, the focus of `bit_ops` is on raw primitive integer types.
Documentation
name: Build

on: [ push, pull_request, merge_group ]

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  style:
    name: Code style
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - name: Setup Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - name: cargo fmt
        run: cargo fmt -- --check
      - name: cargo clippy
        run: cargo clippy --all-targets
      - name: cargo doc
        run: cargo doc --document-private-items --no-deps

  build:
    strategy:
      fail-fast: false
      matrix:
        runs-on: [ macos-latest, ubuntu-latest, windows-latest ]
        # MSRV
        rust: [ 1.85.1, stable, nightly ]
    runs-on: ${{ matrix.runs-on }}
    steps:
      - uses: actions/checkout@v5
      - name: Setup Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ matrix.rust }}
      - uses: Swatinem/rust-cache@v2
        with:
          key: "${{ matrix.runs-on }}-${{ matrix.rust }}"
      - name: cargo check (debug)
        run: cargo check --verbose
      - name: cargo check (release)
        run: cargo check --verbose --release
      - name: cargo build (debug)
        run: cargo build --verbose
      - name: cargo build (debug) [no_std]
        run: |
          # Picked some random no_std target
          rustup target add thumbv7em-none-eabihf
          cargo build --verbose --target thumbv7em-none-eabihf
      - name: cargo build (release)
        run: cargo build --verbose --release
      - run: cargo test --verbose

  bench:
    strategy:
      fail-fast: false
      matrix:
        runs-on: [ macos-latest, ubuntu-latest, windows-latest ]
        rust: [ stable ]
    runs-on: ${{ matrix.runs-on }}
    steps:
      - uses: actions/checkout@v5
      - name: Setup Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ matrix.rust }}
      - uses: Swatinem/rust-cache@v2
        with:
          key: "${{ matrix.runs-on }}-${{ matrix.rust }}"
      - name: cargo bench
        run: cargo bench