Compare commits

..

2 Commits

Author SHA1 Message Date
Manos Pitsidianakis f3cce66e74
Bump version to 0.8.5
Cargo manifest lints / Lint Cargo manifests on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 12m30s Details
Run Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 16m40s Details
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 6m36s Details
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-06 11:36:51 +03:00
Manos Pitsidianakis b5ddc397df
terminal: remove unwrap() from get_events() loop
When exiting the app, the received value might be None.

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-05-06 10:49:41 +03:00
3 changed files with 6 additions and 2 deletions

View File

@ -93,6 +93,8 @@ Contributors in alphabetical order:
- [1fcb1d59](https://git.meli-email.org/meli/meli/commit/1fcb1d59b8d07ce1be861690b2b4c1d1b2b4fde3) `Remove rerun when build.rs changes`
- [933bf157](https://git.meli-email.org/meli/meli/commit/933bf157ae105c55ccb65880b4f3eef7039b54d5) `Ack \ as an atom`
- [a1cbb198](https://git.meli-email.org/meli/meli/commit/a1cbb1988b34951046045f724f52bed2925b3880) `Return Results instead of panicking`
- [b5ddc397](https://git.meli-email.org/meli/meli/commit/b5ddc397df982a885bb797f1ae762fe8f58fce56) `Remove unwrap() from get_events() loop`
### Changes

1
debian/changelog vendored
View File

@ -72,6 +72,7 @@ meli (0.8.5-1) bookworm; urgency=low
- 1fcb1d59 Remove rerun when build.rs changes
- 933bf157 Ack \ as an atom
- a1cbb198 Return Results instead of panicking
- b5ddc397 Remove unwrap() from get_events() loop
Changes
=======

View File

@ -215,9 +215,10 @@ enum InputMode {
Paste(Vec<u8>),
}
#[derive(Debug)]
#[derive(Debug, Default)]
/// Main process sends commands to the input thread.
pub enum InputCommand {
#[default]
/// Exit thread
Kill,
}
@ -303,7 +304,7 @@ pub fn get_events(
continue 'poll_while;
};
let _ = nix::unistd::read(new_command_fd.as_raw_fd(), buf.as_mut());
match cmd.unwrap() {
match cmd.unwrap_or_default() {
InputCommand::Kill => return,
}
}