Update xmpp/parsers and env_logger deps
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
62fb3c6023
commit
4d35662f5c
2 changed files with 7 additions and 6 deletions
|
@ -7,11 +7,11 @@ keywords = ["xmpp", "jabber", "upload"]
|
|||
license = "AGPL-3.0-or-later"
|
||||
|
||||
[dependencies]
|
||||
env_logger = "0.8"
|
||||
env_logger = "0.10"
|
||||
log = "0.4"
|
||||
tokio = "1"
|
||||
xmpp = "0.3"
|
||||
xmpp-parsers = "0.19"
|
||||
xmpp = "0.4"
|
||||
xmpp-parsers = "0.20"
|
||||
|
||||
[patch.crates-io]
|
||||
jid = { path = "../xmpp-rs/jid" }
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
use env_logger;
|
||||
use std::env::args;
|
||||
use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
use xmpp::{ClientBuilder, ClientType, Event};
|
||||
use xmpp_parsers::BareJid;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Option<()>> {
|
||||
|
@ -24,12 +26,11 @@ async fn main() -> Result<(), Option<()>> {
|
|||
let file = Path::new(&args[4]);
|
||||
|
||||
// Client instance
|
||||
let mut client = ClientBuilder::new(jid, password)
|
||||
let mut client = ClientBuilder::new(BareJid::from_str(jid).unwrap(), password)
|
||||
.set_client(ClientType::Bot, "upload-rs")
|
||||
.set_website("https://gitlab.com/xmpp-rs/xmpp-rs")
|
||||
.set_default_nick("uploaders")
|
||||
.build()
|
||||
.unwrap();
|
||||
.build();
|
||||
|
||||
'outer: while let Some(events) = client.wait_for_events().await {
|
||||
for event in events {
|
||||
|
|
Loading…
Reference in a new issue