diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 210995b7..469c15fc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -83,4 +83,4 @@ repos: entry: env RUSTDOCFLAGS=-Dwarnings cargo language: system pass_filenames: false - args: [doc, --locked, --workspace, --no-deps] + args: [doc, --locked, --workspace, --all-features, --no-deps] diff --git a/CHANGELOG.md b/CHANGELOG.md index a1b253cf..be526279 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,12 @@ # Changelog +## v0.7.0 (Unreleased) + +### Breaking Changes + +- Server: Removed inconsistent `server::*` re-exports from `prelude::tcp` + ## v0.6.1 (2023-02-13) - Server: Provide access to `SlaveId` in request diff --git a/src/prelude.rs b/src/prelude.rs index cb95c2bf..69f8731e 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -1,19 +1,13 @@ // SPDX-FileCopyrightText: Copyright (c) 2017-2023 slowtec GmbH // SPDX-License-Identifier: MIT OR Apache-2.0 -//! Common types +//! Common types and traits /////////////////////////////////////////////////////////////////// /// Modules /////////////////////////////////////////////////////////////////// pub use crate::client; -#[allow(missing_docs)] -#[cfg(feature = "sync")] -pub mod sync { - pub use crate::client::sync::*; -} - #[allow(missing_docs)] #[cfg(feature = "rtu")] pub mod rtu { @@ -24,13 +18,13 @@ pub mod rtu { #[cfg(feature = "tcp")] pub mod tcp { pub use crate::client::tcp::*; - - #[cfg(feature = "server")] - pub use crate::server::*; } -#[cfg(feature = "server")] -pub use crate::server; +#[allow(missing_docs)] +#[cfg(feature = "sync")] +pub mod sync { + pub use crate::client::sync::*; +} /////////////////////////////////////////////////////////////////// /// Structs @@ -45,14 +39,7 @@ pub use crate::frame::SlaveRequest; /// Traits /////////////////////////////////////////////////////////////////// pub use crate::client::{Client, Reader, Writer}; - pub use crate::slave::SlaveContext; #[cfg(feature = "sync")] -pub use crate::client::sync::Client as SyncClient; - -#[cfg(feature = "sync")] -pub use crate::client::sync::Reader as SyncReader; - -#[cfg(feature = "sync")] -pub use crate::client::sync::Writer as SyncWriter; +pub use crate::client::sync::{Client as SyncClient, Reader as SyncReader, Writer as SyncWriter};