Skip to content

Commit

Permalink
Simplify imports
Browse files Browse the repository at this point in the history
uklotzde committed Sep 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 25521a8 commit e224e74
Showing 5 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions src/client/sync/mod.rs
Original file line number Diff line number Diff line change
@@ -16,8 +16,7 @@ use futures_util::future::Either;
use crate::{frame::*, Result, Slave};

use super::{
Client as AsyncClient, Context as AsyncContext, Reader as AsyncReader, SlaveContext,
Writer as AsyncWriter,
Client as AsyncClient, Context as AsyncContext, Reader as _, SlaveContext, Writer as _,
};

fn block_on_with_timeout<T, E>(
3 changes: 1 addition & 2 deletions src/prelude.rs
Original file line number Diff line number Diff line change
@@ -29,8 +29,7 @@ pub mod sync {
///////////////////////////////////////////////////////////////////
/// Types
///////////////////////////////////////////////////////////////////
pub use crate::{Exception, ProtocolError, Request, Response};
pub use crate::{Slave, SlaveId};
pub use crate::{Exception, ProtocolError, Request, Response, Slave, SlaveId};

#[cfg(feature = "server")]
pub use crate::frame::SlaveRequest;
2 changes: 1 addition & 1 deletion tests/exception/mod.rs
Original file line number Diff line number Diff line change
@@ -4,7 +4,7 @@
use std::future;

use tokio_modbus::{
client::{Context, Reader, Writer},
client::{Context, Reader as _, Writer as _},
server::Service,
Exception, Request, Response,
};
5 changes: 1 addition & 4 deletions tests/rtu_all_exceptions.rs
Original file line number Diff line number Diff line change
@@ -10,10 +10,7 @@ mod exception;
use std::{thread, time::Duration};

use exception::check_client_context;
use tokio_modbus::{
client::{self},
server::rtu::Server,
};
use tokio_modbus::{client, server::rtu::Server};
use tokio_serial::SerialPortBuilder;

use crate::exception::TestService;
2 changes: 1 addition & 1 deletion tests/tcp_all_exceptions.rs
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ use std::{net::SocketAddr, time::Duration};
use exception::check_client_context;
use tokio::net::TcpListener;
use tokio_modbus::{
client::{self},
client,
server::tcp::{accept_tcp_connection, Server},
};

0 comments on commit e224e74

Please sign in to comment.