diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76284cac..66370fef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,7 @@ jobs: rustfmt: name: Rustfmt runs-on: ubuntu-latest + steps: - name: Checkout uses: actions/checkout@v4 @@ -29,7 +30,7 @@ jobs: run: cargo fmt --check clippy: - name: Clippy${{ matrix.features.name }} + name: Clippy ${{ matrix.features.name }} runs-on: ubuntu-latest strategy: @@ -37,10 +38,10 @@ jobs: matrix: features: - { features: "" } - - { name: " (`tls-rustls`)", features: --features tls-rustls } - - { name: " (`tls-rustls-no-provider`)", features: --features tls-rustls-no-provider } - - { name: " (`tls-openssl`)", features: --features tls-openssl, openssl: true } - - { name: " (`--all-features`)", features: --all-features, openssl: true } + - { name: "(`tls-rustls`)", features: --features tls-rustls } + - { name: "(`tls-rustls-no-provider`)", features: --features tls-rustls-no-provider } + - { name: "(`tls-openssl`)", features: --features tls-openssl, openssl: true } + - { name: "(`--all-features`)", features: --all-features, openssl: true } steps: - name: Checkout @@ -52,3 +53,28 @@ jobs: uses: dtolnay/rust-toolchain@stable - name: Run Clippy run: cargo clippy --all-targets ${{ matrix.features.features }} -- -D warnings + + rustdoc: + name: Rustdoc ${{ matrix.rust.name }} + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + rust: + - { version: stable } + - { name: "with `cfg(docsrs)`", version: nightly, flags: --cfg=docsrs } + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install OpenSSL + run: sudo apt-get install pkg-config libssl-dev + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust.version }} + - name: Run Rustdoc + env: + RUSTDOCFLAGS: -D warnings ${{ matrix.rust.flags }} + run: cargo doc --no-deps --document-private-items --lib --examples --all-features diff --git a/src/lib.rs b/src/lib.rs index 1a4f2a8e..83b683ce 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ //! # Guide //! //! axum-server can [`serve`] items that implement [`MakeService`] with some additional [trait -//! bounds](crate::service::MakeServiceRef). Make services that are [created] using [`axum`] +//! bounds](crate::service::MakeService). Make services that are [created] using [`axum`] //! complies with those trait bounds out of the box. Therefore it is more convenient to use this //! crate with [`axum`]. //!