From e23a06def06426fc185d1ff4d758deeb2faca743 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Wed, 28 Jun 2023 22:13:05 +0200 Subject: [PATCH] refactor: crate docs metadata [skip ci] --- .github/workflows/release.crate.yml | 5 +---- Cargo.toml | 8 ++++---- Makefile | 2 -- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.crate.yml b/.github/workflows/release.crate.yml index 60c1d2a..5900fe1 100644 --- a/.github/workflows/release.crate.yml +++ b/.github/workflows/release.crate.yml @@ -35,7 +35,4 @@ jobs: - name: Publish workspace packages env: CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }} - RUSTFLAGS: "--cfg docsrs" - RUSTDOCFLAGS: "--cfg docsrs" - run: | - cargo publish -p static-web-server --all-features + run: cargo publish -p static-web-server diff --git a/Cargo.toml b/Cargo.toml index 8a1380f..3df089f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,10 +24,6 @@ include = [ autotests = true autoexamples = true -[package.metadata.docs.rs] -all-features = true -rustc-args = ["--cfg", "docsrs"] - [lib] name = "static_web_server" path = "src/lib.rs" @@ -109,3 +105,7 @@ opt-level = 3 panic = "abort" rpath = false strip = true + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] diff --git a/Makefile b/Makefile index adfc0e9..3543960 100644 --- a/Makefile +++ b/Makefile @@ -262,14 +262,12 @@ crate-docs: crate-docs-dev: @env \ - RUSTFLAGS="--cfg docsrs" \ RUSTDOCFLAGS="--cfg docsrs" \ cargo doc --lib --no-deps --all-features --document-private-items @echo "Crate documentation: http://localhost:8787/static_web_server" @static-web-server -p 8787 -d target/doc/ \ & watchman-make -p 'src/**/*.rs' --run '\ env \ - RUSTFLAGS="--cfg docsrs" \ RUSTDOCFLAGS="--cfg docsrs" \ cargo doc --lib --no-deps --all-features --document-private-items' .PHONY: crate-docs-dev -- libgit2 1.7.2