Radish alpha
r
Radicle terminal user interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
patch/issue-select: Improve app exit
Erik Kundt committed 2 years ago
commit e39645bbec1728cf27c45d994d596c0be9d096fb
parent b230a33f6fcd99bee9416dd9e1bc0dc28b216b0d
2 files changed +9 -9
modified bin/commands/issue/select/event.rs
@@ -111,7 +111,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
                code: Key::Enter, ..
            }) => submit().map(|id| {
                let exit = SelectionExit::default()
-
                    .with_operation(format!("{}", IssueOperation::Show))
+
                    .with_operation(IssueOperation::Show.to_string())
                    .with_id(IssueId::from(id));
                Message::Quit(Some(exit))
            }),
@@ -120,7 +120,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
                ..
            }) => submit().map(|id| {
                let exit = SelectionExit::default()
-
                    .with_operation(format!("{}", IssueOperation::Delete))
+
                    .with_operation(IssueOperation::Delete.to_string())
                    .with_id(IssueId::from(id));
                Message::Quit(Some(exit))
            }),
@@ -129,7 +129,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
                ..
            }) => submit().map(|id| {
                let exit = SelectionExit::default()
-
                    .with_operation(format!("{}", IssueOperation::Edit))
+
                    .with_operation(IssueOperation::Edit.to_string())
                    .with_id(IssueId::from(id));
                Message::Quit(Some(exit))
            }),
@@ -138,7 +138,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
                ..
            }) => submit().map(|id| {
                let exit = SelectionExit::default()
-
                    .with_operation(format!("{}", IssueOperation::Comment))
+
                    .with_operation(IssueOperation::Comment.to_string())
                    .with_id(IssueId::from(id));
                Message::Quit(Some(exit))
            }),
modified bin/commands/patch/select/event.rs
@@ -111,7 +111,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
                code: Key::Enter, ..
            }) => submit().map(|id| {
                let exit = SelectionExit::default()
-
                    .with_operation(format!("{}", PatchOperation::Show))
+
                    .with_operation(PatchOperation::Show.to_string())
                    .with_id(PatchId::from(id));
                Message::Quit(Some(exit))
            }),
@@ -120,7 +120,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
                ..
            }) => submit().map(|id| {
                let exit = SelectionExit::default()
-
                    .with_operation(format!("{}", PatchOperation::Checkout))
+
                    .with_operation(PatchOperation::Checkout.to_string())
                    .with_id(PatchId::from(id));
                Message::Quit(Some(exit))
            }),
@@ -129,7 +129,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
                ..
            }) => submit().map(|id| {
                let exit = SelectionExit::default()
-
                    .with_operation(format!("{}", PatchOperation::Delete))
+
                    .with_operation(PatchOperation::Delete.to_string())
                    .with_id(PatchId::from(id));
                Message::Quit(Some(exit))
            }),
@@ -138,7 +138,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
                ..
            }) => submit().map(|id| {
                let exit = SelectionExit::default()
-
                    .with_operation(format!("{}", PatchOperation::Edit))
+
                    .with_operation(PatchOperation::Edit.to_string())
                    .with_id(PatchId::from(id));
                Message::Quit(Some(exit))
            }),
@@ -147,7 +147,7 @@ impl tuirealm::Component<Message, NoUserEvent> for Widget<OperationSelect> {
                ..
            }) => submit().map(|id| {
                let exit = SelectionExit::default()
-
                    .with_operation(format!("{}", PatchOperation::Comment))
+
                    .with_operation(PatchOperation::Comment.to_string())
                    .with_id(PatchId::from(id));
                Message::Quit(Some(exit))
            }),