From 21c9fa2df4105cd298b2d32757342ca9047b58a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 17 Aug 2023 16:17:53 +0200 Subject: [PATCH] xmpp: Update to tokio-xmpp 3.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- xmpp/Cargo.toml | 3 +-- xmpp/examples/hello_bot.rs | 2 +- xmpp/src/lib.rs | 6 +++--- xmpp/src/pubsub/avatar.rs | 2 +- xmpp/src/pubsub/mod.rs | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/xmpp/Cargo.toml b/xmpp/Cargo.toml index a99d874..8ad9714 100644 --- a/xmpp/Cargo.toml +++ b/xmpp/Cargo.toml @@ -14,8 +14,7 @@ license = "MPL-2.0" edition = "2018" [dependencies] -tokio-xmpp = "3.2" -xmpp-parsers = "0.19" +tokio-xmpp = "3.4" futures = "0.3" tokio = { version = "1", features = ["fs"] } log = "0.4" diff --git a/xmpp/examples/hello_bot.rs b/xmpp/examples/hello_bot.rs index 74b56c1..0a6a93b 100644 --- a/xmpp/examples/hello_bot.rs +++ b/xmpp/examples/hello_bot.rs @@ -7,8 +7,8 @@ use env_logger; use std::env::args; use std::str::FromStr; +use tokio_xmpp::parsers::{message::MessageType, BareJid, Jid}; use xmpp::{ClientBuilder, ClientFeature, ClientType, Event}; -use xmpp_parsers::{message::MessageType, BareJid, Jid}; #[tokio::main] async fn main() -> Result<(), Option<()>> { diff --git a/xmpp/src/lib.rs b/xmpp/src/lib.rs index 956d850..6149116 100644 --- a/xmpp/src/lib.rs +++ b/xmpp/src/lib.rs @@ -15,8 +15,7 @@ use std::path::{Path, PathBuf}; use std::sync::{Arc, RwLock}; use tokio::fs::File; use tokio_util::codec::{BytesCodec, FramedRead}; -use tokio_xmpp::{AsyncClient as TokioXmppClient, Event as TokioXmppEvent}; -use xmpp_parsers::{ +use tokio_xmpp::parsers::{ bookmarks2::Conference, caps::{compute_disco, hash_caps, Caps}, disco::{DiscoInfoQuery, DiscoInfoResult, Feature, Identity}, @@ -33,8 +32,9 @@ use xmpp_parsers::{ pubsub::pubsub::{Items, PubSub}, roster::{Item as RosterItem, Roster}, stanza_error::{DefinedCondition, ErrorType, StanzaError}, - BareJid, Element, Jid, }; +use tokio_xmpp::{AsyncClient as TokioXmppClient, Event as TokioXmppEvent}; +use tokio_xmpp::{BareJid, Element, Jid}; #[macro_use] extern crate log; diff --git a/xmpp/src/pubsub/avatar.rs b/xmpp/src/pubsub/avatar.rs index 54a5db7..d2c8aac 100644 --- a/xmpp/src/pubsub/avatar.rs +++ b/xmpp/src/pubsub/avatar.rs @@ -9,7 +9,7 @@ use crate::Event; use std::convert::TryFrom; use std::fs::{self, File}; use std::io::{self, Write}; -use xmpp_parsers::{ +use tokio_xmpp::parsers::{ avatar::{Data, Metadata}, iq::Iq, ns, diff --git a/xmpp/src/pubsub/mod.rs b/xmpp/src/pubsub/mod.rs index f0a4b75..f049157 100644 --- a/xmpp/src/pubsub/mod.rs +++ b/xmpp/src/pubsub/mod.rs @@ -8,7 +8,7 @@ use super::Agent; use crate::Event; use std::convert::TryFrom; use std::str::FromStr; -use xmpp_parsers::{ +use tokio_xmpp::parsers::{ bookmarks2::{Autojoin, Conference}, ns, pubsub::event::PubSubEvent,