Skip to content

Commit

Permalink
Build documentation for Serde in docs.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gianmarco Garrisi committed Feb 28, 2024
1 parent 6dd30c7 commit bec0582
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ edition = "2021"
autocfg = "1"

[dependencies]
equivalent = "1.0.1"
indexmap = {version = "2", features = [], default-features = false}
serde = { version = "1", optional = true }

Expand All @@ -32,3 +33,7 @@ benchmarks = []

[workspace]
members = ["test-nostd"]

[package.metadata.docs.rs]
features = ["serde"]
rustdoc-args = ["--cfg", "docsrs"]
1 change: 1 addition & 0 deletions src/double_priority_queue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,7 @@ fn better_to_rebuild(len1: usize, len2: usize) -> bool {
}

#[cfg(feature = "serde")]
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
mod serde {
use std::cmp::{Eq, Ord};
use std::hash::{BuildHasher, Hash};
Expand Down
1 change: 1 addition & 0 deletions src/priority_queue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,7 @@ fn better_to_rebuild(len1: usize, len2: usize) -> bool {
}

#[cfg(feature = "serde")]
#[cfg_attr(docsrs, doc(cfg(feature = "serde")))]
mod serde {
use std::cmp::{Eq, Ord};
use std::hash::{BuildHasher, Hash};
Expand Down

0 comments on commit bec0582

Please sign in to comment.