diff --git a/src/client/sync/mod.rs b/src/client/sync/mod.rs index 70bd4cfc..16db651e 100644 --- a/src/client/sync/mod.rs +++ b/src/client/sync/mod.rs @@ -11,7 +11,7 @@ pub mod rtu; #[cfg(feature = "tcp-sync")] pub mod tcp; -use std::{future::Future, time::Duration}; +use std::{future::Future, io::Result, time::Duration}; use futures::future::Either; @@ -22,9 +22,6 @@ use super::{ Writer as AsyncWriter, }; -/// Re-export -pub use std::io::Result; - fn block_on_with_timeout( runtime: &tokio::runtime::Runtime, timeout: Option, diff --git a/src/client/sync/rtu.rs b/src/client/sync/rtu.rs index 9ad15cd3..ae9a0d7d 100644 --- a/src/client/sync/rtu.rs +++ b/src/client/sync/rtu.rs @@ -1,9 +1,9 @@ // SPDX-FileCopyrightText: Copyright (c) 2017-2022 slowtec GmbH // SPDX-License-Identifier: MIT OR Apache-2.0 -use std::time::Duration; +use std::{io::Result, time::Duration}; -use super::{block_on_with_timeout, Context, Result}; +use super::{block_on_with_timeout, Context}; use tokio_serial::{SerialPortBuilder, SerialStream}; diff --git a/src/client/sync/tcp.rs b/src/client/sync/tcp.rs index 165cfc53..96f34f7c 100644 --- a/src/client/sync/tcp.rs +++ b/src/client/sync/tcp.rs @@ -3,12 +3,11 @@ //! TCP client connections -use std::{net::SocketAddr, time::Duration}; +use std::{io::Result, net::SocketAddr, time::Duration}; -use crate::client::tcp::connect_slave as async_connect_slave; -use crate::slave::Slave; +use crate::{client::tcp::connect_slave as async_connect_slave, slave::Slave}; -use super::{block_on_with_timeout, Context, Result}; +use super::{block_on_with_timeout, Context}; /// Establish a direct connection to a Modbus TCP coupler. pub fn connect(socket_addr: SocketAddr) -> Result {