Skip to content

Commit

Permalink
misc: move accessing the inner connection to unstable feature
Browse files Browse the repository at this point in the history
  • Loading branch information
SeaDve committed Nov 19, 2023
1 parent ee5dd70 commit 907fde1
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: doc
args: --package mpris-server --no-deps
args: --package mpris-server --features "unstable" --no-deps

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ 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"
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ This library supports all the following interfaces as defined in the specificati

To implement these interfaces, this crate offers two flavors: you can either create your own struct and implement `RootInterface` and `PlayerInterface` (or with optional `TrackListInterface` and `PlaylistsInterface`), or you can use the ready-to-use `Player` struct.

## Optional Features

| Feature | Description | Default |
| ---------- | -------------------------------------------- | ------- |
| `unstable` | Enables internal APIs and unstable features. | No |

## Examples

For more detailed examples, see also the [examples directory](https://github.com/SeaDve/mpris-server/tree/main/examples).
Expand Down
1 change: 1 addition & 0 deletions src/local_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ where
/// Returns a reference to the inner [`Connection`].
///
/// If you needed to call this, consider filing an issue.
#[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 @@ -411,6 +411,7 @@ where
/// Returns a reference to the inner [`Connection`].
///
/// If you needed to call this, consider filing an issue.
#[cfg(feature = "unstable")]
#[inline]
pub fn connection(&self) -> &Connection {
&self.connection
Expand Down

0 comments on commit 907fde1

Please sign in to comment.