From d967778690f5c57b526fbfb871d61d2930efae27 Mon Sep 17 00:00:00 2001 From: sagudev <16504129+sagudev@users.noreply.github.com> Date: Sun, 18 Aug 2024 18:01:20 +0200 Subject: [PATCH] Remove unstable rustfmt options Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com> --- rustfmt.toml | 7 ------- src/router.rs | 10 ++++++---- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/rustfmt.toml b/rustfmt.toml index 3f3762516..ecd1b1465 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,9 +1,2 @@ match_block_trailing_comma = true -match_arm_blocks = false -binop_separator = "Back" reorder_imports = true -# TODO(dlrobertson): gradually start formatting files -ignore = [ - "src/platform", - "src/ipc.rs" -] diff --git a/src/router.rs b/src/router.rs index 0c7f669dc..99943aa6a 100644 --- a/src/router.rs +++ b/src/router.rs @@ -178,7 +178,7 @@ impl Router { match result { // Message came from the RouterProxy. Listen on our `msg_receiver` // channel. - IpcSelectionResult::MessageReceived(id, _) if id == self.msg_wakeup_id => + IpcSelectionResult::MessageReceived(id, _) if id == self.msg_wakeup_id => { match self.msg_receiver.recv().unwrap() { RouterMsg::AddRoute(receiver, handler) => { let new_receiver_id = @@ -191,10 +191,12 @@ impl Router { .expect("Failed to send comfirmation of shutdown."); break; }, - }, + } + }, // Event from one of our registered receivers, call callback. - IpcSelectionResult::MessageReceived(id, message) => - self.handlers.get_mut(&id).unwrap()(message), + IpcSelectionResult::MessageReceived(id, message) => { + self.handlers.get_mut(&id).unwrap()(message) + }, IpcSelectionResult::ChannelClosed(id) => { let _ = self.handlers.remove(&id).unwrap(); },