Skip to content

Commit

Permalink
Simplify imports
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Sep 10, 2024
1 parent 25521a8 commit e224e74
Show file tree
Hide file tree
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
Expand Up @@ -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>(
Expand Down
3 changes: 1 addition & 2 deletions src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/exception/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
5 changes: 1 addition & 4 deletions tests/rtu_all_exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/tcp_all_exceptions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
};

Expand Down

0 comments on commit e224e74

Please sign in to comment.