Skip to content

Commit

Permalink
Remove inconsistent server re-exports from prelude::tcp
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde authored and flosse committed Feb 13, 2023
1 parent f3eb2fe commit cd1e0da
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
27 changes: 7 additions & 20 deletions src/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
// SPDX-FileCopyrightText: Copyright (c) 2017-2023 slowtec GmbH <[email protected]>
// 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 {
Expand All @@ -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
Expand All @@ -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};

0 comments on commit cd1e0da

Please sign in to comment.