Remove redundant imports

These became warnings in a recent nightly.

The TryFrom/TryInto imports were missed in
4089891f6c, but the rest are truly
redundant.
This commit is contained in:
Emmanuel Gil Peyrot 2024-02-27 15:16:47 +01:00
parent 6df8062867
commit 1bab5c3cd9
22 changed files with 2 additions and 27 deletions

View file

@ -11,7 +11,6 @@
//! Provides an error type for this crate. //! Provides an error type for this crate.
use std::convert::From;
use std::error::Error as StdError; use std::error::Error as StdError;
/// Our main error type. /// Our main error type.

View file

@ -132,7 +132,6 @@ impl From<Conference> for Element {
mod tests { mod tests {
use super::*; use super::*;
use crate::pubsub::{pubsub::Item as PubSubItem, PubSubEvent}; use crate::pubsub::{pubsub::Item as PubSubItem, PubSubEvent};
use crate::Element;
#[cfg(target_pointer_width = "32")] #[cfg(target_pointer_width = "32")]
#[test] #[test]

View file

@ -183,7 +183,6 @@ pub fn query_ecaps2(hash: Hash) -> DiscoInfoQuery {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::util::error::Error;
use crate::Element; use crate::Element;
#[cfg(target_pointer_width = "32")] #[cfg(target_pointer_width = "32")]

View file

@ -114,7 +114,6 @@ impl IqResultPayload for SlotResult {}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::Element;
#[test] #[test]
fn test_slot_request() { fn test_slot_request() {

View file

@ -160,8 +160,6 @@ impl IqResultPayload for Fin {}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::util::error::Error;
use minidom::Element;
#[cfg(target_pointer_width = "32")] #[cfg(target_pointer_width = "32")]
#[test] #[test]

View file

@ -185,7 +185,7 @@ impl From<PubSubOwner> for Element {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::data_forms::{DataForm, DataFormType, Field, FieldType}; use crate::data_forms::{DataFormType, Field, FieldType};
use jid::BareJid; use jid::BareJid;
use std::str::FromStr; use std::str::FromStr;

View file

@ -544,7 +544,7 @@ impl From<PubSub> for Element {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::data_forms::{DataForm, DataFormType, Field, FieldType}; use crate::data_forms::{DataFormType, Field, FieldType};
#[test] #[test]
fn create() { fn create() {

View file

@ -35,7 +35,6 @@ generate_element!(
mod tests { mod tests {
use super::*; use super::*;
use crate::Element; use crate::Element;
use std::convert::{TryFrom, TryInto};
#[cfg(target_pointer_width = "32")] #[cfg(target_pointer_width = "32")]
#[test] #[test]

View file

@ -213,7 +213,6 @@ impl From<Failure> for Element {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::Element;
#[cfg(target_pointer_width = "32")] #[cfg(target_pointer_width = "32")]
#[test] #[test]

View file

@ -100,7 +100,6 @@ pub fn generate_address_field<S: Into<String>>(var: S, values: Vec<String>) -> F
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::data_forms::{DataForm, DataFormType, Field, FieldType};
#[cfg(target_pointer_width = "32")] #[cfg(target_pointer_width = "32")]
#[test] #[test]

View file

@ -95,7 +95,6 @@ impl IqResultPayload for VCard {}
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use crate::Element;
use base64::Engine; use base64::Engine;
use std::str::FromStr; use std::str::FromStr;

View file

@ -1,7 +1,4 @@
use std::collections::HashMap; use std::collections::HashMap;
use std::convert::From;
use std::string::FromUtf8Error; use std::string::FromUtf8Error;
#[cfg(feature = "scram")] #[cfg(feature = "scram")]

View file

@ -4,7 +4,6 @@ use std::fs::{create_dir_all, File};
use std::io::{self, Write}; use std::io::{self, Write};
use std::process::exit; use std::process::exit;
use std::str::FromStr; use std::str::FromStr;
use tokio;
use tokio_xmpp::AsyncClient as Client; use tokio_xmpp::AsyncClient as Client;
use xmpp_parsers::{ use xmpp_parsers::{
avatar::{Data as AvatarData, Metadata as AvatarMetadata}, avatar::{Data as AvatarData, Metadata as AvatarMetadata},

View file

@ -2,7 +2,6 @@ use futures::stream::StreamExt;
use std::env::args; use std::env::args;
use std::process::exit; use std::process::exit;
use std::str::FromStr; use std::str::FromStr;
use tokio;
use tokio_xmpp::AsyncClient as Client; use tokio_xmpp::AsyncClient as Client;
use xmpp_parsers::message::{Body, Message, MessageType}; use xmpp_parsers::message::{Body, Message, MessageType};
use xmpp_parsers::presence::{Presence, Show as PresenceShow, Type as PresenceType}; use xmpp_parsers::presence::{Presence, Show as PresenceShow, Type as PresenceType};

View file

@ -2,7 +2,6 @@ use std::env::args;
use std::io::{stdin, Read}; use std::io::{stdin, Read};
use std::process::exit; use std::process::exit;
use std::str::FromStr; use std::str::FromStr;
use tokio;
use tokio_xmpp::SimpleClient as Client; use tokio_xmpp::SimpleClient as Client;
use xmpp_parsers::message::{Body, Message}; use xmpp_parsers::message::{Body, Message};
use xmpp_parsers::Jid; use xmpp_parsers::Jid;

View file

@ -1,5 +1,4 @@
use futures::stream::StreamExt; use futures::stream::StreamExt;
use std::marker::Unpin;
use tokio::io::{AsyncRead, AsyncWrite}; use tokio::io::{AsyncRead, AsyncWrite};
use xmpp_parsers::bind::{BindQuery, BindResponse}; use xmpp_parsers::bind::{BindQuery, BindResponse};
use xmpp_parsers::iq::{Iq, IqType}; use xmpp_parsers::iq::{Iq, IqType};

View file

@ -1,5 +1,4 @@
use futures::stream::StreamExt; use futures::stream::StreamExt;
use std::marker::Unpin;
use tokio::io::{AsyncRead, AsyncWrite}; use tokio::io::{AsyncRead, AsyncWrite};
use xmpp_parsers::{component::Handshake, ns}; use xmpp_parsers::{component::Handshake, ns};

View file

@ -1,6 +1,5 @@
use super::error::{ConnectorError, Error}; use super::error::{ConnectorError, Error};
use hickory_resolver::{IntoName, TokioAsyncResolver}; use hickory_resolver::{IntoName, TokioAsyncResolver};
use idna;
use log::debug; use log::debug;
use std::net::SocketAddr; use std::net::SocketAddr;
use tokio::net::TcpStream; use tokio::net::TcpStream;

View file

@ -10,7 +10,6 @@ use {
rustls::{ClientConfig, OwnedTrustAnchor, RootCertStore, ServerName}, rustls::{ClientConfig, OwnedTrustAnchor, RootCertStore, ServerName},
TlsConnector, TlsConnector,
}, },
webpki_roots,
}; };
#[cfg(feature = "tls-native")] #[cfg(feature = "tls-native")]

View file

@ -1,5 +1,4 @@
use futures::{sink::SinkExt, stream::StreamExt}; use futures::{sink::SinkExt, stream::StreamExt};
use std::marker::Unpin;
use tokio::io::{AsyncRead, AsyncWrite}; use tokio::io::{AsyncRead, AsyncWrite};
use tokio_util::codec::Framed; use tokio_util::codec::Framed;
use xmpp_parsers::{ns, Element, Jid}; use xmpp_parsers::{ns, Element, Jid};

View file

@ -5,9 +5,7 @@ use bytes::{BufMut, BytesMut};
use log::debug; use log::debug;
use minidom::tree_builder::TreeBuilder; use minidom::tree_builder::TreeBuilder;
use rxml::{Lexer, PushDriver, RawParser}; use rxml::{Lexer, PushDriver, RawParser};
use std;
use std::collections::HashMap; use std::collections::HashMap;
use std::default::Default;
use std::fmt::Write; use std::fmt::Write;
use std::io; use std::io;
#[cfg(feature = "syntax-highlighting")] #[cfg(feature = "syntax-highlighting")]
@ -252,7 +250,6 @@ impl<'a> std::io::Write for WriteBytes<'a> {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use super::*; use super::*;
use bytes::BytesMut;
#[test] #[test]
fn test_stream_start() { fn test_stream_start() {

View file

@ -4,7 +4,6 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this // License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
use env_logger;
use std::env::args; use std::env::args;
use std::str::FromStr; use std::str::FromStr;
use tokio_xmpp::parsers::{message::MessageType, BareJid, Jid}; use tokio_xmpp::parsers::{message::MessageType, BareJid, Jid};