diff --git a/src/dds/participant.rs b/src/dds/participant.rs index 086584e5..3858a079 100644 --- a/src/dds/participant.rs +++ b/src/dds/participant.rs @@ -1454,14 +1454,11 @@ mod tests { use crate::{ dds::{qos::QosPolicies, topic::TopicKind}, messages::{ - header::Header, - protocol_id::ProtocolId, - protocol_version::ProtocolVersion, - submessages::submessages::{AckNack, SubmessageHeader, SubmessageKind, *}, - vendor_id::VendorId, + header::Header, protocol_id::ProtocolId, protocol_version::ProtocolVersion, + submessages::submessages::*, vendor_id::VendorId, }, network::{constant::user_traffic_unicast_port, udp_sender::UDPSender}, - rtps::{submessage::*, Message, Submessage}, + rtps::{submessage::*, Message}, serialization::cdr_serializer::CDRSerializerAdapter, structure::{ guid::{EntityId, GUID}, diff --git a/src/dds/with_key/datareader.rs b/src/dds/with_key/datareader.rs index 0e1ec942..48c77f6b 100644 --- a/src/dds/with_key/datareader.rs +++ b/src/dds/with_key/datareader.rs @@ -1006,13 +1006,13 @@ mod tests { message_receiver::*, reader::{Reader, ReaderIngredients}, }, - serialization::{cdr_deserializer::CDRDeserializerAdapter, cdr_serializer::to_bytes}, + serialization::cdr_serializer::to_bytes, structure::{ guid::{EntityId, EntityKind, GuidPrefix}, sequence_number::SequenceNumber, }, test::random_data::*, - Keyed, RepresentationIdentifier, + RepresentationIdentifier, }; #[test] diff --git a/src/dds/with_key/datawriter.rs b/src/dds/with_key/datawriter.rs index 46ca7a0e..44c3c1a5 100644 --- a/src/dds/with_key/datawriter.rs +++ b/src/dds/with_key/datawriter.rs @@ -1228,11 +1228,7 @@ mod tests { use super::*; use crate::{ - dds::{ - key::{Key, Keyed}, - participant::DomainParticipant, - }, - serialization::cdr_serializer::CDRSerializerAdapter, + dds::{key::Key, participant::DomainParticipant}, structure::topic_kind::TopicKind, test::random_data::*, }; diff --git a/src/discovery/discovery.rs b/src/discovery/discovery.rs index e61332be..87840cb4 100644 --- a/src/discovery/discovery.rs +++ b/src/discovery/discovery.rs @@ -1984,18 +1984,15 @@ mod tests { use std::net::SocketAddr; use chrono::Utc; - use mio_06::Token; use speedy::{Endianness, Writable}; use super::*; use crate::{ - dds::{adapters::no_key::DeserializerAdapter, participant::DomainParticipant}, + dds::adapters::no_key::DeserializerAdapter, discovery::sedp_messages::TopicBuiltinTopicData, messages::submessages::submessages::{InterpreterSubmessage, WriterSubmessage}, network::{constant::*, udp_listener::UDPListener, udp_sender::UDPSender}, rtps::submessage::*, - serialization::cdr_deserializer::CDRDeserializerAdapter, - structure::{entity::RTPSEntity, locator::Locator}, test::{ shape_type::ShapeType, test_data::{ diff --git a/src/discovery/discovery_db.rs b/src/discovery/discovery_db.rs index bd231ddc..b5be15df 100644 --- a/src/discovery/discovery_db.rs +++ b/src/discovery/discovery_db.rs @@ -788,10 +788,7 @@ impl DiscoveryDB { #[cfg(test)] mod tests { - use std::{ - sync::{Arc, Mutex}, - time::Duration as StdDuration, - }; + use std::{sync::Mutex, time::Duration as StdDuration}; use byteorder::LittleEndian; use mio_extras::channel as mio_channel; diff --git a/src/discovery/sedp_messages.rs b/src/discovery/sedp_messages.rs index ccd6747c..6e20a80d 100644 --- a/src/discovery/sedp_messages.rs +++ b/src/discovery/sedp_messages.rs @@ -1275,7 +1275,6 @@ impl Key for ParticipantMessageDataKey {} #[cfg(test)] mod tests { use byteorder::LittleEndian; - use bytes::Bytes; use log::info; use test_log::test; // to capture logging macros run by test cases @@ -1290,7 +1289,6 @@ mod tests { content_filter_data, publication_builtin_topic_data, reader_proxy_data, subscription_builtin_topic_data, topic_data, writer_proxy_data, }, - RepresentationIdentifier, }; /* do not test separate ser/deser of components, as these are never seen on wire individually diff --git a/src/discovery/spdp_participant_data.rs b/src/discovery/spdp_participant_data.rs index 24fa849d..ebbe1328 100644 --- a/src/discovery/spdp_participant_data.rs +++ b/src/discovery/spdp_participant_data.rs @@ -602,7 +602,6 @@ mod tests { messages::submessages::submessages::WriterSubmessage, rtps::{submessage::*, Message}, test::test_data::*, - RepresentationIdentifier, }; #[test] diff --git a/src/rtps/dp_event_loop.rs b/src/rtps/dp_event_loop.rs index f1944b7b..15bcb2c4 100644 --- a/src/rtps/dp_event_loop.rs +++ b/src/rtps/dp_event_loop.rs @@ -1054,13 +1054,8 @@ fn check_are_endpoints_securities_compatible( #[cfg(test)] mod tests { - use std::{ - sync::{Arc, Mutex}, - thread, - time::Duration, - }; + use std::{sync::Mutex, thread}; - use mio_06::{PollOpt, Ready}; use mio_extras::channel as mio_channel; use super::*; @@ -1072,7 +1067,6 @@ mod tests { with_key::simpledatareader::ReaderCommand, }, mio_source, - structure::dds_cache::DDSCache, }; //#[test] diff --git a/src/rtps/message.rs b/src/rtps/message.rs index 1b41e1a6..0f58a309 100644 --- a/src/rtps/message.rs +++ b/src/rtps/message.rs @@ -528,7 +528,6 @@ impl MessageBuilder { #[allow(non_snake_case)] mod tests { use log::info; - use speedy::Writable; use super::*; diff --git a/src/rtps/reader.rs b/src/rtps/reader.rs index aad469bd..e969849f 100644 --- a/src/rtps/reader.rs +++ b/src/rtps/reader.rs @@ -1437,17 +1437,9 @@ mod tests { use std::sync::RwLock; use crate::{ - dds::{ - qos::policy::Reliability, - statusevents::{sync_status_channel, DataReaderStatus}, - typedesc::TypeDesc, - with_key::datawriter::WriteOptions, - }, - structure::{ - dds_cache::DDSCache, - guid::{EntityId, EntityKind, GUID}, - }, - Duration, QosPolicyBuilder, + dds::{qos::policy::Reliability, statusevents::sync_status_channel, typedesc::TypeDesc}, + structure::{dds_cache::DDSCache, guid::EntityKind}, + QosPolicyBuilder, }; use super::*; diff --git a/src/rtps/submessage.rs b/src/rtps/submessage.rs index 360aecfb..150a63f7 100644 --- a/src/rtps/submessage.rs +++ b/src/rtps/submessage.rs @@ -331,13 +331,9 @@ impl Writable for Submessage { #[cfg(test)] mod tests { - use bytes::Bytes; - use enumflags2::BitFlags; use log::info; - use speedy::{Readable, Writable}; use hex_literal::hex; - use super::Submessage; use crate::{messages::submessages::submessages::*, rtps::submessage::*}; #[test] diff --git a/src/security/access_control/access_control_builtin/domain_governance_document.rs b/src/security/access_control/access_control_builtin/domain_governance_document.rs index 6cd1aac3..d3cc54a1 100644 --- a/src/security/access_control/access_control_builtin/domain_governance_document.rs +++ b/src/security/access_control/access_control_builtin/domain_governance_document.rs @@ -248,8 +248,6 @@ mod xml { #[cfg(test)] mod tests { - use serde_xml_rs::from_str; - use super::*; #[test] diff --git a/src/structure/guid.rs b/src/structure/guid.rs index 781aa873..0fa17af0 100644 --- a/src/structure/guid.rs +++ b/src/structure/guid.rs @@ -627,7 +627,6 @@ impl fmt::Debug for GUID { #[cfg(test)] mod tests { use speedy::Endianness; - use mio_06::Token; use log::info; use byteorder::BigEndian; diff --git a/src/structure/locator.rs b/src/structure/locator.rs index ff32437f..09ecbc78 100644 --- a/src/structure/locator.rs +++ b/src/structure/locator.rs @@ -161,7 +161,7 @@ pub(crate) mod repr { mod tests { use std::net::{Ipv4Addr, Ipv6Addr, SocketAddr}; - use speedy::{self, Endianness, Readable, Writable}; + use speedy::{Endianness, Readable, Writable}; use test_case::test_case; use super::{repr, Locator}; diff --git a/src/test/test_data.rs b/src/test/test_data.rs index 16386e26..6990d498 100644 --- a/src/test/test_data.rs +++ b/src/test/test_data.rs @@ -102,10 +102,7 @@ use crate::{ }, messages::{ header::Header, - submessages::{ - elements::serialized_payload::SerializedPayload, - submessages::{Data, SubmessageHeader, SubmessageKind, WriterSubmessage, *}, - }, + submessages::{elements::serialized_payload::SerializedPayload, submessages::*}, }, rtps::{Message, Submessage, SubmessageBody}, serialization::pl_cdr_adapters::*, @@ -115,7 +112,6 @@ use crate::{ locator::Locator, sequence_number::SequenceNumber, }, - RepresentationIdentifier, }; pub(crate) fn spdp_participant_msg() -> Message {