style(main): consistent brace omittal

This commit is contained in:
xeruf 2025-01-29 23:06:42 +01:00
parent 807df3069a
commit a7c6cf2f59

View file

@ -22,7 +22,7 @@ use rustyline::error::ReadlineError;
use rustyline::DefaultEditor;
use std::collections::{HashMap, VecDeque};
use std::env;
use std::env::{args};
use std::env::args;
use std::fs;
use std::fs::File;
use std::io::{BufRead, BufReader, Write};
@ -469,7 +469,7 @@ async fn main() -> Result<()> {
if tasks.custom_time.is_none() { tasks.move_up(); }
}
Some('&') => {
Some('&') =>
match arg {
None => tasks.undo(),
Some(text) => {
@ -506,9 +506,8 @@ async fn main() -> Result<()> {
}
}
}
}
Some('@') => {
Some('@') =>
match arg {
None => {
let today = Timestamp::now() - 80_000;
@ -538,10 +537,9 @@ async fn main() -> Result<()> {
}
}
}
};
}
Some('*') => {
Some('*') =>
match arg {
None => match tasks.get_position() {
None => {
@ -565,7 +563,6 @@ async fn main() -> Result<()> {
}
}
}
}
Some('|') =>
match arg {
@ -590,13 +587,12 @@ async fn main() -> Result<()> {
}
}
Some('?') => {
Some('?') =>
match arg {
None => tasks.set_state_filter(StateFilter::Default),
Some("?") => tasks.set_state_filter(StateFilter::All),
Some(arg) => tasks.set_state_filter(StateFilter::State(arg.to_string())),
}
}
Some('!') =>
match tasks.get_position() {
@ -631,11 +627,10 @@ async fn main() -> Result<()> {
}
}
Some('#') => {
Some('#') =>
if !tasks.update_tags(arg_default.split_whitespace().map(Hashtag::from)) {
continue;
}
}
Some('+') =>
match arg {
@ -681,7 +676,7 @@ async fn main() -> Result<()> {
continue 'repl;
}
Some(')') => {
Some(')') =>
match arg {
None => tasks.move_to(None),
Some(arg) => {
@ -693,7 +688,6 @@ async fn main() -> Result<()> {
continue 'repl;
}
}
}
Some('.') => {
let (remaining, dots) = trim_start_count(&command, '.');
@ -722,7 +716,8 @@ async fn main() -> Result<()> {
}
}
Some('/') => if arg.is_none() {
Some('/') =>
if arg.is_none() {
tasks.move_to(None);
} else {
let (remaining, dots) = trim_start_count(&command, '/');