tokio-xmpp: rustfmt pass in examples

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2024-06-18 20:21:23 +02:00
parent 2af07f4fc0
commit 46fdd9cdfa
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -230,7 +230,10 @@ fn handle_iq_result(pubsub: PubSub, from: &Jid) {
fn save_avatar(from: &Jid, id: String, data: &[u8]) -> io::Result<()> {
let directory = format!("data/{}", from);
let filename = format!("data/{}/{}", from, id);
println!("Saving avatar from {} to {}.", from, filename);
println!(
"Saving avatar from {} to {}.",
from, filename
);
create_dir_all(directory)?;
let mut file = File::create(filename)?;
file.write_all(data)