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.
use std::convert::From;
use std::error::Error as StdError;
/// Our main error type.

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -2,7 +2,6 @@ use futures::stream::StreamExt;
use std::env::args;
use std::process::exit;
use std::str::FromStr;
use tokio;
use tokio_xmpp::AsyncClient as Client;
use xmpp_parsers::message::{Body, Message, MessageType};
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::process::exit;
use std::str::FromStr;
use tokio;
use tokio_xmpp::SimpleClient as Client;
use xmpp_parsers::message::{Body, Message};
use xmpp_parsers::Jid;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -5,9 +5,7 @@ use bytes::{BufMut, BytesMut};
use log::debug;
use minidom::tree_builder::TreeBuilder;
use rxml::{Lexer, PushDriver, RawParser};
use std;
use std::collections::HashMap;
use std::default::Default;
use std::fmt::Write;
use std::io;
#[cfg(feature = "syntax-highlighting")]
@ -252,7 +250,6 @@ impl<'a> std::io::Write for WriteBytes<'a> {
#[cfg(test)]
mod tests {
use super::*;
use bytes::BytesMut;
#[test]
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
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
use env_logger;
use std::env::args;
use std::str::FromStr;
use tokio_xmpp::parsers::{message::MessageType, BareJid, Jid};