From b1d84ed3d79e9ddbdd826d64436ed54544f4fac2 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Wed, 22 Nov 2023 17:07:22 -0500 Subject: [PATCH 1/2] Make Cargo feature explicit To keep consistent with all other crates, and for clarity, it is best to explicitly declare `defmt-03` as a feature of the `embedded-hal` crate. This way people can look at the `[features]` section rather than search through any optional dependencies. In this case it's not that big of a deal, but it keeps the pattern. --- embedded-hal/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/embedded-hal/Cargo.toml b/embedded-hal/Cargo.toml index 396cf972b..b67a46680 100644 --- a/embedded-hal/Cargo.toml +++ b/embedded-hal/Cargo.toml @@ -15,5 +15,8 @@ readme = "README.md" repository = "https://github.com/rust-embedded/embedded-hal" version = "1.0.0-rc.1" +[features] +defmt-03 = ["dep:defmt-03"] + [dependencies] defmt-03 = { package = "defmt", version = "0.3", optional = true } From 7fa580567a6b4f5ba907c0ea20bc7d36db0134d2 Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Sat, 25 Nov 2023 00:26:06 +0100 Subject: [PATCH 2/2] Workaround https://github.com/tokio-rs/tokio/issues/6165 --- .github/workflows/rustdoc.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rustdoc.yml b/.github/workflows/rustdoc.yml index cef117665..c4b46425e 100644 --- a/.github/workflows/rustdoc.yml +++ b/.github/workflows/rustdoc.yml @@ -14,4 +14,5 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: nightly-2023-10-14 - - run: RUSTDOCFLAGS="--deny=warnings --cfg=docsrs" cargo doc --all-features + # tokio/net required to workaround https://github.com/tokio-rs/tokio/issues/6165 + - run: RUSTDOCFLAGS="--deny=warnings --cfg=docsrs" cargo doc --all-features --features tokio/net