chiark / gitweb /
Another run of 'cargo fmt'.
authorSimon Tatham <anakin@pobox.com>
Wed, 24 Jan 2024 20:02:30 +0000 (20:02 +0000)
committerSimon Tatham <anakin@pobox.com>
Wed, 24 Jan 2024 20:02:30 +0000 (20:02 +0000)
Sooner or later I'm going to have to start automating this. Otherwise
there will be too many random formatting changes mixed in to every
other patch I make.

src/file.rs
src/menu.rs
src/tui.rs

index 46b5700241acb497cd77f67573140bcbfff0ccb5..a525e09f1dcf09b509df83ce53a47deb6314b674 100644 (file)
@@ -6,7 +6,7 @@ use std::collections::{hash_map, HashMap, HashSet};
 use std::rc::Rc;
 
 use super::activity_stack::{
-    NonUtilityActivity, OverlayActivity, UtilityActivity, ComposeActivity,
+    ComposeActivity, NonUtilityActivity, OverlayActivity, UtilityActivity,
 };
 use super::client::{
     Boosts, Client, ClientError, FeedExtend, FeedId, Replies,
index 409e3649ed340a83ee4c7f25d7280de1153c8a91..5a185b62da709a1c05770036319a7adc3f403110 100644 (file)
@@ -2,7 +2,7 @@ use itertools::Itertools;
 use std::collections::HashMap;
 
 use super::activity_stack::{
-    NonUtilityActivity, OverlayActivity, UtilityActivity, ComposeActivity,
+    ComposeActivity, NonUtilityActivity, OverlayActivity, UtilityActivity,
 };
 use super::client::Client;
 use super::coloured_string::ColouredString;
index 467a8d98ca7ddca5a7a42414f780ed6dccc0050f..83bfe20c0a9a19bb2cdd096f38b971cc42cb4100 100644 (file)
@@ -778,12 +778,12 @@ impl TuiLogicalState {
                 LogicalAction::Error(_) => break PhysicalAction::Beep, // FIXME: Error Log
                 LogicalAction::PostComposed(post) => {
                     let newact = match self.activity_stack.top() {
-                        Activity::Compose(ComposeActivity::ComposeToplevel) => {
-                            ComposeActivity::PostComposeMenu.into()
-                        }
-                        Activity::Compose(ComposeActivity::ComposeReply(id)) => {
-                            ComposeActivity::PostReplyMenu(id).into()
-                        }
+                        Activity::Compose(
+                            ComposeActivity::ComposeToplevel,
+                        ) => ComposeActivity::PostComposeMenu.into(),
+                        Activity::Compose(ComposeActivity::ComposeReply(
+                            id,
+                        )) => ComposeActivity::PostReplyMenu(id).into(),
                         act => panic!("can't postcompose {act:?}"),
                     };
                     self.activity_stack.chain_to(newact);
@@ -792,12 +792,12 @@ impl TuiLogicalState {
                 }
                 LogicalAction::PostReEdit(post) => {
                     let newact = match self.activity_stack.top() {
-                        Activity::Compose(ComposeActivity::PostComposeMenu) => {
-                            ComposeActivity::ComposeToplevel.into()
-                        }
-                        Activity::Compose(ComposeActivity::PostReplyMenu(id)) => {
-                            ComposeActivity::ComposeReply(id).into()
-                        }
+                        Activity::Compose(
+                            ComposeActivity::PostComposeMenu,
+                        ) => ComposeActivity::ComposeToplevel.into(),
+                        Activity::Compose(ComposeActivity::PostReplyMenu(
+                            id,
+                        )) => ComposeActivity::ComposeReply(id).into(),
                         act => panic!("can't reedit {act:?}"),
                     };
                     self.activity_stack.chain_to(newact);
@@ -1012,9 +1012,9 @@ impl TuiLogicalState {
                 compose_post(client, post)
             })(
             ),
-            Activity::Compose(ComposeActivity::PostComposeMenu) => Ok(post_menu(
-                post.expect("how did we get here without a Post?"),
-            )),
+            Activity::Compose(ComposeActivity::PostComposeMenu) => Ok(
+                post_menu(post.expect("how did we get here without a Post?")),
+            ),
             Activity::Compose(ComposeActivity::ComposeReply(ref id)) => {
                 let post = match post {
                     Some(post) => Ok(post),