From 82908d4e001d1be6fd5d692fcb2e08908c4b5e16 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Tue, 24 Oct 2023 19:20:09 -0300 Subject: [PATCH] fix(docs): adjust manifest to fix docs.rs build (#1045) --- .changes/fix-docs-build.md | 5 +++++ Cargo.toml | 4 +++- src/lib.rs | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changes/fix-docs-build.md diff --git a/.changes/fix-docs-build.md b/.changes/fix-docs-build.md new file mode 100644 index 000000000..b0e034e74 --- /dev/null +++ b/.changes/fix-docs-build.md @@ -0,0 +1,5 @@ +--- +"wry": patch +--- + +Fix docs.rs build. diff --git a/Cargo.toml b/Cargo.toml index b2f02f4d4..2ae3dab10 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,12 +14,14 @@ categories = [ "gui" ] [package.metadata.docs.rs] no-default-features = true -features = [ "file-drop", "protocol" ] +features = [ "tao", "file-drop", "protocol", "webkit2gtk/dox" ] targets = [ "x86_64-unknown-linux-gnu", "x86_64-pc-windows-msvc", "x86_64-apple-darwin" ] +rustc-args = [ "--cfg", "docsrs" ] +rustdoc-args = [ "--cfg", "docsrs" ] [features] default = [ "file-drop", "objc-exception", "protocol", "tao" ] diff --git a/src/lib.rs b/src/lib.rs index 88ba3b40b..6007818ac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -79,6 +79,7 @@ #![allow(clippy::type_complexity)] #![allow(clippy::unit_cmp)] #![allow(clippy::upper_case_acronyms)] +#![cfg_attr(docsrs, feature(doc_cfg))] #[macro_use] extern crate serde;