Skip to content

Commit

Permalink
docs: improve handling on features
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Nov 19, 2023
1 parent 907fde1 commit 9c15707
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
env:
RUSTFLAGS: --cfg docsrs
RUSTDOCFLAGS: --cfg docsrs
with:
command: doc
args: --package mpris-server --features "unstable" --no-deps
Expand Down
11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,14 @@ futures-util = { version = "0.3", default-features = false, features = ["std"] }
serde = "1.0"
zbus = "3.14"

[features]
unstable = []

[dev-dependencies]
async-std = { version = "1.12", features = ["attributes", "unstable"] }
static_assertions = "1.1"

[features]
unstable = []

[package.metadata.docs.rs]
features = ["unstable"]
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
1 change: 1 addition & 0 deletions src/local_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,7 @@ where
///
/// If you needed to call this, consider filing an issue.
#[cfg(feature = "unstable")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[inline]
pub fn connection(&self) -> &Connection {
self.inner.connection()
Expand Down
1 change: 1 addition & 0 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ where
///
/// If you needed to call this, consider filing an issue.
#[cfg(feature = "unstable")]
#[cfg_attr(docsrs, doc(cfg(feature = "unstable")))]
#[inline]
pub fn connection(&self) -> &Connection {
&self.connection
Expand Down

0 comments on commit 9c15707

Please sign in to comment.