except 0.3.0

The only one `Error`.
Documentation
# Copyright 2023 jmjoy
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Rust

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - "**"

env:
  CARGO_TERM_COLOR: always
  RUST_BACKTRACE: "1"
  RUSTFLAGS: "-D warnings"
  RUST_NIGHTLY_TOOLCHAIN: "nightly-2023-05-19"

jobs:
  required:
    name: Required
    needs:
      - rust
      - license
    runs-on: ubuntu-20.04
    steps:
      - name: Check results
        run: |
          [[ ${{ needs.rust.result }} == 'success' ]] || exit 1;
          [[ ${{ needs.license.result }} == 'success' ]] || exit 1;

  license:
    name: License
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          submodules: 'recursive'
      - name: Check License Header
        uses: apache/skywalking-eyes/header/@d299844e334855087f18ae1fe3c81ae8d22bc282
        with:
          config: .licenserc.yaml
      - name: Check Dependencies License
        uses: apache/skywalking-eyes/dependency/@d299844e334855087f18ae1fe3c81ae8d22bc282
        with:
          config: .licenserc.yaml

  rust:
    name: Rust

    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-20.04
          - macos-12
          - windows-2022

    runs-on: ${{ matrix.os }}
    steps:
      - name: Checkout
        uses: actions/checkout@v2
        with:
          submodules: "recursive"

      - name: Install Rust
        uses: actions-rs/toolchain@v1
        with:
          toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
          components: rustfmt, clippy

      - name: Setup cargo cache
        uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ matrix.os }}--${{ hashFiles('**/Cargo.lock') }}

      - name: Cargo fmt
        uses: actions-rs/cargo@v1
        with:
          toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
          command: fmt
          args: --all -- --check
        if: matrix.os != 'windows-2022'

      - name: Cargo clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --release --workspace

      - name: Cargo test
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --release --workspace

      - name: Cargo doc
        uses: actions-rs/cargo@v1
        with:
          toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN }}
          command: doc
          args: --workspace --no-deps --all-features