From 302ac9b050881e73195258b14279b29c7c132dd1 Mon Sep 17 00:00:00 2001 From: Sijmen Date: Fri, 17 Nov 2023 10:17:20 +0100 Subject: [PATCH] cargo fmt --- src/main.rs | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 0fcc2ed..cf44a8d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -82,7 +82,10 @@ impl Cri { let command = tokens.next().unwrap(); match command { "/join" => { - let channel = tokens.next().map(str::to_string).or_else(|| self.message_log.active_channel.clone()); + let channel = tokens + .next() + .map(str::to_string) + .or_else(|| self.message_log.active_channel.clone()); if channel.is_none() { // TODO error message return; @@ -94,16 +97,21 @@ impl Cri { return; } - self - .input_tx - .borrow() - .send(IrcCommand::JOIN(channel.clone(), tokens.next().map(str::to_string), None).into()) - .unwrap(); + self.input_tx + .borrow() + .send( + IrcCommand::JOIN(channel.clone(), tokens.next().map(str::to_string), None) + .into(), + ) + .unwrap(); self.message_log.set_active(Some(channel)); - }, + } "/part" => { - let channel = tokens.next().map(str::to_string).or_else(|| self.message_log.active_channel.clone()); + let channel = tokens + .next() + .map(str::to_string) + .or_else(|| self.message_log.active_channel.clone()); if channel.is_none() { // TODO error message return;