Skip to content

Commit

Permalink
Remove re-export of std::io::Result
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Oct 25, 2022
1 parent 1007d74 commit 99b2ec9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
5 changes: 1 addition & 4 deletions src/client/sync/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -22,9 +22,6 @@ use super::{
Writer as AsyncWriter,
};

/// Re-export
pub use std::io::Result;

fn block_on_with_timeout<T>(
runtime: &tokio::runtime::Runtime,
timeout: Option<Duration>,
Expand Down
4 changes: 2 additions & 2 deletions src/client/sync/rtu.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-FileCopyrightText: Copyright (c) 2017-2022 slowtec GmbH <[email protected]>
// 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};

Expand Down
7 changes: 3 additions & 4 deletions src/client/sync/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Context> {
Expand Down

0 comments on commit 99b2ec9

Please sign in to comment.