Rustfmt pass, and rustfmt --check in CI"

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2019-10-23 01:32:41 +02:00
commit a104ebc3f6
No known key found for this signature in database
GPG key ID: DEDA74AEECA9D0F2
79 changed files with 1344 additions and 957 deletions

View file

@ -3,20 +3,13 @@ use std::convert::TryFrom;
use std::env::args;
use std::process::exit;
use tokio::runtime::current_thread::Runtime;
use tokio_xmpp::{Client, xmpp_codec::Packet};
use tokio_xmpp::{xmpp_codec::Packet, Client};
use xmpp_parsers::{
Element,
Jid,
disco::{DiscoInfoQuery, DiscoInfoResult},
iq::{Iq, IqType},
ns,
iq::{
Iq,
IqType,
},
disco::{
DiscoInfoResult,
DiscoInfoQuery,
},
server_info::ServerInfo,
Element, Jid,
};
fn main() {
@ -95,17 +88,19 @@ fn make_disco_iq(target: Jid) -> Element {
}
fn convert_field(field: Vec<String>) -> String {
field.iter()
.fold((field.len(), String::new()), |(l, mut acc), s| {
acc.push('<');
acc.push_str(&s);
acc.push('>');
if l > 1 {
acc.push(',');
acc.push(' ');
}
(0, acc)
}).1
field
.iter()
.fold((field.len(), String::new()), |(l, mut acc), s| {
acc.push('<');
acc.push_str(&s);
acc.push('>');
if l > 1 {
acc.push(',');
acc.push(' ');
}
(0, acc)
})
.1
}
fn print_server_info(server_info: ServerInfo) {