Skip to content

Commit

Permalink
Fix warnings from Rust 1.80 by rely on docsrs --cfg provided by docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingun authored and dralley committed May 25, 2024
1 parent 740b788 commit 5fd130a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,6 @@ serialize = ["serde"] # "dep:" prefix only avalible from Rust 1.60
[package.metadata.docs.rs]
# document all features
all-features = true
# defines the configuration attribute `docs_rs` to enable feature requirements
# See https://stackoverflow.com/questions/61417452
rustdoc-args = ["--cfg", "docs_rs"]

# Tests, benchmarks and examples doesn't included in package on crates.io,
# so we need to specify a path, otherwise `cargo package` complains
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
#![recursion_limit = "1024"]
// Enable feature requirements in the docs from 1.57
// See https://stackoverflow.com/questions/61417452
#![cfg_attr(docs_rs, feature(doc_auto_cfg))]
// docs.rs defines `docsrs` when building documentation
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

#[cfg(feature = "serialize")]
pub mod de;
Expand Down

0 comments on commit 5fd130a

Please sign in to comment.