mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
Update edition to 2021
- Remove TryFrom/Into and FromIterator imports - Prevent impl_validator_using_provider macro in sasl crate from constructing trait object Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
c8f312e89d
commit
4089891f6c
94 changed files with 8 additions and 100 deletions
|
@ -7,6 +7,7 @@ members = [ # alphabetically sorted
|
||||||
"tokio-xmpp",
|
"tokio-xmpp",
|
||||||
"xmpp",
|
"xmpp",
|
||||||
]
|
]
|
||||||
|
resolver = "2"
|
||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
jid = { path = "jid" }
|
jid = { path = "jid" }
|
||||||
|
|
|
@ -13,7 +13,7 @@ documentation = "https://docs.rs/jid"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = ["xmpp", "jid"]
|
keywords = ["xmpp", "jid"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
gitlab = { repository = "xmpp-rs/xmpp-rs" }
|
gitlab = { repository = "xmpp-rs/xmpp-rs" }
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
//! mixing left-to-write and right-to-left characters
|
//! mixing left-to-write and right-to-left characters
|
||||||
|
|
||||||
use core::num::NonZeroU16;
|
use core::num::NonZeroU16;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ documentation = "https://docs.rs/minidom"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = ["xml", "xmpp"]
|
keywords = ["xml", "xmpp"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
gitlab = { repository = "xmpp-rs/xmpp-rs" }
|
gitlab = { repository = "xmpp-rs/xmpp-rs" }
|
||||||
|
|
|
@ -20,7 +20,6 @@ use crate::prefixes::{Namespace, Prefix, Prefixes};
|
||||||
use crate::tree_builder::TreeBuilder;
|
use crate::tree_builder::TreeBuilder;
|
||||||
|
|
||||||
use std::collections::{btree_map, BTreeMap};
|
use std::collections::{btree_map, BTreeMap};
|
||||||
use std::convert::{TryFrom, TryInto};
|
|
||||||
use std::io::{BufRead, Write};
|
use std::io::{BufRead, Write};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
|
@ -884,8 +883,6 @@ mod tests {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_element_new() {
|
fn test_element_new() {
|
||||||
use std::iter::FromIterator;
|
|
||||||
|
|
||||||
let elem = Element::new(
|
let elem = Element::new(
|
||||||
"name".to_owned(),
|
"name".to_owned(),
|
||||||
"namespace".to_owned(),
|
"namespace".to_owned(),
|
||||||
|
|
|
@ -13,7 +13,6 @@ use crate::error::Result;
|
||||||
|
|
||||||
use rxml::writer::Item;
|
use rxml::writer::Item;
|
||||||
|
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
/// A node in an element tree.
|
/// A node in an element tree.
|
||||||
|
|
|
@ -11,7 +11,7 @@ repository = "https://gitlab.com/xmpp-rs/xmpp-rs"
|
||||||
keywords = ["xmpp", "jabber", "xml"]
|
keywords = ["xmpp", "jabber", "xml"]
|
||||||
categories = ["parsing", "network-programming"]
|
categories = ["parsing", "network-programming"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
minidom = "0.15"
|
minidom = "0.15"
|
||||||
|
|
|
@ -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 std::convert::TryFrom;
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::io::{self, Read};
|
use std::io::{self, Read};
|
||||||
use xmpp_parsers::{
|
use xmpp_parsers::{
|
||||||
|
|
|
@ -21,7 +21,6 @@ mod tests {
|
||||||
#[cfg(not(feature = "disable-validation"))]
|
#[cfg(not(feature = "disable-validation"))]
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
|
|
|
@ -61,7 +61,6 @@ mod tests {
|
||||||
#[cfg(not(feature = "disable-validation"))]
|
#[cfg(not(feature = "disable-validation"))]
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -9,7 +9,6 @@ use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::{FullJid, Jid};
|
use jid::{FullJid, Jid};
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
/// The request for resource binding, which is the process by which a client
|
/// The request for resource binding, which is the process by which a client
|
||||||
|
|
|
@ -9,7 +9,6 @@ use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_empty_element!(
|
generate_empty_element!(
|
||||||
/// The element requesting the blocklist, the result iq will contain a
|
/// The element requesting the blocklist, the result iq will contain a
|
||||||
|
|
|
@ -89,7 +89,6 @@ generate_element!(
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -71,7 +71,6 @@ impl Storage {
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_attribute!(
|
generate_attribute!(
|
||||||
/// Whether a conference bookmark should be joined automatically.
|
/// Whether a conference bookmark should be joined automatically.
|
||||||
|
@ -123,7 +122,6 @@ 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;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -17,7 +17,6 @@ use digest::{Digest, Update, VariableOutput};
|
||||||
use sha1::Sha1;
|
use sha1::Sha1;
|
||||||
use sha2::{Sha256, Sha512};
|
use sha2::{Sha256, Sha512};
|
||||||
use sha3::{Sha3_256, Sha3_512};
|
use sha3::{Sha3_256, Sha3_512};
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Represents a capability hash for a given client.
|
/// Represents a capability hash for a given client.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
|
@ -64,7 +64,6 @@ impl MessagePayload for Sent {}
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -121,7 +121,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
|
|
|
@ -35,7 +35,6 @@ mod tests {
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
|
|
|
@ -44,7 +44,6 @@ impl Handshake {
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -30,7 +30,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
|
|
|
@ -8,7 +8,6 @@ use crate::media_element::MediaElement;
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_element!(
|
generate_element!(
|
||||||
/// Represents one of the possible values for a list- field.
|
/// Represents one of the possible values for a list- field.
|
||||||
|
|
|
@ -35,7 +35,6 @@ mod tests {
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::BareJid;
|
use jid::BareJid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
|
|
|
@ -10,7 +10,6 @@ use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_element!(
|
generate_element!(
|
||||||
/// Structure representing a `<query xmlns='http://jabber.org/protocol/disco#info'/>` element.
|
/// Structure representing a `<query xmlns='http://jabber.org/protocol/disco#info'/>` element.
|
||||||
|
|
|
@ -185,7 +185,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -26,7 +26,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -141,7 +141,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -28,7 +28,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -205,7 +205,6 @@ impl Deref for Sha1HexAttribute {
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -4,8 +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 std::convert::TryFrom;
|
|
||||||
|
|
||||||
use crate::iq::{IqGetPayload, IqResultPayload};
|
use crate::iq::{IqGetPayload, IqResultPayload};
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
|
@ -117,7 +115,6 @@ impl IqResultPayload for SlotResult {}
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_slot_request() {
|
fn test_slot_request() {
|
||||||
|
|
|
@ -74,7 +74,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -10,7 +10,6 @@ use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Query for registering against a service.
|
/// Query for registering against a service.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
|
@ -23,7 +23,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -11,7 +11,6 @@ use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use minidom::IntoAttributeValue;
|
use minidom::IntoAttributeValue;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Should be implemented on every known payload of an `<iq type='get'/>`.
|
/// Should be implemented on every known payload of an `<iq type='get'/>`.
|
||||||
pub trait IqGetPayload: TryFrom<Element> + Into<Element> {}
|
pub trait IqGetPayload: TryFrom<Element> + Into<Element> {}
|
||||||
|
|
|
@ -42,7 +42,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::FullJid;
|
use jid::FullJid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -15,7 +15,6 @@ use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,6 @@ impl Fingerprint {
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -11,7 +11,6 @@ use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use minidom::{Element, Node};
|
use minidom::{Element, Node};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
generate_element!(
|
generate_element!(
|
||||||
|
|
|
@ -52,7 +52,6 @@ generate_element!(
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -26,7 +26,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -114,7 +114,6 @@ mod tests {
|
||||||
use crate::hashes::Algo;
|
use crate::hashes::Algo;
|
||||||
use crate::jingle_dtls_srtp::Setup;
|
use crate::jingle_dtls_srtp::Setup;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -8,7 +8,6 @@ use crate::jingle::SessionId;
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Defines a protocol for broadcasting Jingle requests to all of the clients
|
/// Defines a protocol for broadcasting Jingle requests to all of the clients
|
||||||
/// of a user.
|
/// of a user.
|
||||||
|
|
|
@ -60,7 +60,6 @@ generate_element!(
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -20,7 +20,6 @@ generate_element!(
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -153,7 +153,6 @@ generate_element!(
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -56,7 +56,6 @@ impl RtpHdrext {
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -8,7 +8,6 @@ use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::net::IpAddr;
|
use std::net::IpAddr;
|
||||||
|
|
||||||
generate_attribute!(
|
generate_attribute!(
|
||||||
|
|
|
@ -79,7 +79,6 @@ generate_element!(
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -182,7 +182,6 @@ impl MessagePayload for Encrypted {}
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_bundle() {
|
fn parse_bundle() {
|
||||||
|
|
|
@ -92,7 +92,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use minidom::Element;
|
use minidom::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -9,7 +9,6 @@ use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use minidom::{Element, Node};
|
use minidom::{Element, Node};
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_attribute!(
|
generate_attribute!(
|
||||||
/// Notes the default archiving preference for the user.
|
/// Notes the default archiving preference for the user.
|
||||||
|
|
|
@ -48,7 +48,6 @@ mod tests {
|
||||||
use crate::data_forms::DataForm;
|
use crate::data_forms::DataForm;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -9,7 +9,6 @@ use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Should be implemented on every known payload of a `<message/>`.
|
/// Should be implemented on every known payload of a `<message/>`.
|
||||||
pub trait MessagePayload: TryFrom<Element> + Into<Element> {}
|
pub trait MessagePayload: TryFrom<Element> + Into<Element> {}
|
||||||
|
|
|
@ -23,7 +23,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -255,7 +255,6 @@ impl Destroy {
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn participant() {
|
fn participant() {
|
||||||
|
|
|
@ -272,7 +272,6 @@ generate_elem_id!(
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -96,7 +96,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -12,7 +12,6 @@ use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
|
|
||||||
use jid::FullJid;
|
use jid::FullJid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_attribute_enum!(
|
generate_attribute_enum!(
|
||||||
/// Lists all of the possible status codes used in MUC presences.
|
/// Lists all of the possible status codes used in MUC presences.
|
||||||
|
|
|
@ -17,7 +17,6 @@ mod tests {
|
||||||
#[cfg(not(feature = "disable-validation"))]
|
#[cfg(not(feature = "disable-validation"))]
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -28,7 +28,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -23,7 +23,6 @@ mod tests {
|
||||||
#[cfg(not(feature = "disable-validation"))]
|
#[cfg(not(feature = "disable-validation"))]
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
|
|
|
@ -10,7 +10,6 @@ use crate::util::error::Error;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use minidom::{Element, IntoAttributeValue};
|
use minidom::{Element, IntoAttributeValue};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
/// Should be implemented on every known payload of a `<presence/>`.
|
/// Should be implemented on every known payload of a `<presence/>`.
|
||||||
|
|
|
@ -12,7 +12,6 @@ use crate::pubsub::{Item as PubSubItem, ItemId, NodeName, Subscription, Subscrip
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Event wrapper for a PubSub `<item/>`.
|
/// Event wrapper for a PubSub `<item/>`.
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
|
@ -12,7 +12,6 @@ use crate::pubsub::{AffiliationAttribute, NodeName, Subscription};
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_element!(
|
generate_element!(
|
||||||
/// A list of affiliations you have on a service, or on a node.
|
/// A list of affiliations you have on a service, or on a node.
|
||||||
|
|
|
@ -13,7 +13,6 @@ use crate::pubsub::{
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
// TODO: a better solution would be to split this into a query and a result elements, like for
|
// TODO: a better solution would be to split this into a query and a result elements, like for
|
||||||
// XEP-0030.
|
// XEP-0030.
|
||||||
|
|
|
@ -34,7 +34,6 @@ mod tests {
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -93,7 +93,6 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Requests paging through a potentially big set of items (represented by an
|
/// Requests paging through a potentially big set of items (represented by an
|
||||||
/// UID).
|
/// UID).
|
||||||
|
|
|
@ -8,7 +8,6 @@ use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::util::helpers::PlainText;
|
use crate::util::helpers::PlainText;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_attribute!(
|
generate_attribute!(
|
||||||
/// Events for real-time text.
|
/// Events for real-time text.
|
||||||
|
@ -245,7 +244,6 @@ impl From<Rtt> for Element {
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -9,7 +9,6 @@ use crate::util::error::Error;
|
||||||
use crate::util::helpers::Base64;
|
use crate::util::helpers::Base64;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_attribute!(
|
generate_attribute!(
|
||||||
/// The list of available SASL mechanisms.
|
/// The list of available SASL mechanisms.
|
||||||
|
@ -215,7 +214,6 @@ impl From<Failure> for Element {
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
use crate::data_forms::{DataForm, DataFormType, Field, FieldType};
|
use crate::data_forms::{DataForm, DataFormType, Field, FieldType};
|
||||||
use crate::ns;
|
use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Structure representing a `http://jabber.org/network/serverinfo` form type.
|
/// Structure representing a `http://jabber.org/network/serverinfo` form type.
|
||||||
#[derive(Debug, Clone, PartialEq, Default)]
|
#[derive(Debug, Clone, PartialEq, Default)]
|
||||||
|
|
|
@ -146,7 +146,6 @@ generate_empty_element!(
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -11,7 +11,6 @@ use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::Jid;
|
use jid::Jid;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_attribute!(
|
generate_attribute!(
|
||||||
/// The type of the error.
|
/// The type of the error.
|
||||||
|
|
|
@ -40,7 +40,6 @@ mod tests {
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use jid::BareJid;
|
use jid::BareJid;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -74,7 +74,6 @@ impl Stream {
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -10,7 +10,6 @@ use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use chrono::FixedOffset;
|
use chrono::FixedOffset;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
generate_empty_element!(
|
generate_empty_element!(
|
||||||
|
|
|
@ -8,7 +8,6 @@ use crate::ns;
|
||||||
use crate::pubsub::PubSubPayload;
|
use crate::pubsub::PubSubPayload;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
generate_elem_id!(
|
generate_elem_id!(
|
||||||
/// The artist or performer of the song or piece.
|
/// The artist or performer of the song or piece.
|
||||||
|
|
|
@ -42,7 +42,6 @@ impl IqResultPayload for VersionResult {}
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -73,7 +73,6 @@ impl Open {
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::Element;
|
use crate::Element;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
|
|
|
@ -9,7 +9,6 @@ use crate::ns;
|
||||||
use crate::util::error::Error;
|
use crate::util::error::Error;
|
||||||
use minidom::{Element, Node};
|
use minidom::{Element, Node};
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
// TODO: Use a proper lang type.
|
// TODO: Use a proper lang type.
|
||||||
type Lang = String;
|
type Lang = String;
|
||||||
|
|
|
@ -9,7 +9,7 @@ documentation = "https://docs.rs/sasl"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
keywords = ["sasl", "authentication"]
|
keywords = ["sasl", "authentication"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[badges]
|
[badges]
|
||||||
gitlab = { repository = "xmpp-rs/xmpp-rs" }
|
gitlab = { repository = "xmpp-rs/xmpp-rs" }
|
||||||
|
|
|
@ -14,7 +14,7 @@ macro_rules! impl_validator_using_provider {
|
||||||
identity: &$crate::common::Identity,
|
identity: &$crate::common::Identity,
|
||||||
value: &$secret,
|
value: &$secret,
|
||||||
) -> Result<(), $crate::server::ValidatorError> {
|
) -> Result<(), $crate::server::ValidatorError> {
|
||||||
if &(self as &$crate::server::Provider<$secret>).provide(identity)? == value {
|
if $crate::server::Provider::<$secret>::provide(self, identity).is_ok() {
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
Err($crate::server::ValidatorError::AuthenticationFailed)
|
Err($crate::server::ValidatorError::AuthenticationFailed)
|
||||||
|
|
|
@ -9,7 +9,7 @@ repository = "https://gitlab.com/xmpp-rs/xmpp-rs"
|
||||||
documentation = "https://docs.rs/tokio-xmpp"
|
documentation = "https://docs.rs/tokio-xmpp"
|
||||||
categories = ["asynchronous", "network-programming"]
|
categories = ["asynchronous", "network-programming"]
|
||||||
keywords = ["xmpp", "tokio"]
|
keywords = ["xmpp", "tokio"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "1"
|
bytes = "1"
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use futures::stream::StreamExt;
|
use futures::stream::StreamExt;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::env::args;
|
use std::env::args;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use futures::stream::StreamExt;
|
use futures::stream::StreamExt;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::env::args;
|
use std::env::args;
|
||||||
use std::fs::{create_dir_all, File};
|
use std::fs::{create_dir_all, File};
|
||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use futures::stream::StreamExt;
|
use futures::stream::StreamExt;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::env::args;
|
use std::env::args;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use futures::stream::StreamExt;
|
use futures::stream::StreamExt;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::env::args;
|
use std::env::args;
|
||||||
use std::process::exit;
|
use std::process::exit;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
|
@ -4,7 +4,6 @@ use sasl::client::Mechanism;
|
||||||
use sasl::common::scram::{Sha1, Sha256};
|
use sasl::common::scram::{Sha1, Sha256};
|
||||||
use sasl::common::Credentials;
|
use sasl::common::Credentials;
|
||||||
use std::collections::HashSet;
|
use std::collections::HashSet;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use tokio::io::{AsyncRead, AsyncWrite};
|
use tokio::io::{AsyncRead, AsyncWrite};
|
||||||
use xmpp_parsers::sasl::{Auth, Challenge, Failure, Mechanism as XMPPMechanism, Response, Success};
|
use xmpp_parsers::sasl::{Auth, Challenge, Failure, Mechanism as XMPPMechanism, Response, Success};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
use futures::stream::StreamExt;
|
use futures::stream::StreamExt;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::marker::Unpin;
|
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};
|
||||||
|
|
|
@ -2,7 +2,6 @@ use futures::{sink::SinkExt, stream::StreamExt};
|
||||||
|
|
||||||
#[cfg(all(feature = "tls-rust", not(feature = "tls-native")))]
|
#[cfg(all(feature = "tls-rust", not(feature = "tls-native")))]
|
||||||
use {
|
use {
|
||||||
std::convert::TryFrom,
|
|
||||||
std::sync::Arc,
|
std::sync::Arc,
|
||||||
tokio_rustls::{
|
tokio_rustls::{
|
||||||
client::TlsStream,
|
client::TlsStream,
|
||||||
|
|
|
@ -11,7 +11,7 @@ repository = "https://gitlab.com/xmpp-rs/xmpp-rs"
|
||||||
keywords = ["xmpp", "jabber", "chat", "messaging", "bot"]
|
keywords = ["xmpp", "jabber", "chat", "messaging", "bot"]
|
||||||
categories = ["network-programming"]
|
categories = ["network-programming"]
|
||||||
license = "MPL-2.0"
|
license = "MPL-2.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
tokio-xmpp = "3.4"
|
tokio-xmpp = "3.4"
|
||||||
|
|
|
@ -10,7 +10,6 @@ use futures::stream::StreamExt;
|
||||||
use reqwest::{
|
use reqwest::{
|
||||||
header::HeaderMap as ReqwestHeaderMap, Body as ReqwestBody, Client as ReqwestClient,
|
header::HeaderMap as ReqwestHeaderMap, Body as ReqwestBody, Client as ReqwestClient,
|
||||||
};
|
};
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::sync::{Arc, RwLock};
|
use std::sync::{Arc, RwLock};
|
||||||
use tokio::fs::File;
|
use tokio::fs::File;
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
use super::Agent;
|
use super::Agent;
|
||||||
use crate::Event;
|
use crate::Event;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::fs::{self, File};
|
use std::fs::{self, File};
|
||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
use tokio_xmpp::parsers::{
|
use tokio_xmpp::parsers::{
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
|
|
||||||
use super::Agent;
|
use super::Agent;
|
||||||
use crate::Event;
|
use crate::Event;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
use tokio_xmpp::parsers::{
|
use tokio_xmpp::parsers::{
|
||||||
bookmarks2::{Autojoin, Conference},
|
bookmarks2::{Autojoin, Conference},
|
||||||
|
|
Loading…
Reference in a new issue