style: Reorder imports and adjust match arm formatting
This commit is contained in:
committed by
Andrew Phillips (aider)
parent
796ded6a6b
commit
d9f8b02cb6
16
src/main.rs
16
src/main.rs
@@ -1,8 +1,8 @@
|
||||
use nix::fcntl::FdFlag;
|
||||
use std::io::Read;
|
||||
use nix::unistd::{close, pipe};
|
||||
use nix::Error as NixError;
|
||||
use std::collections::HashMap;
|
||||
use std::io::Read;
|
||||
use std::os::fd::FromRawFd;
|
||||
use std::path::PathBuf;
|
||||
use std::process::Stdio; // For Stdio::null, Stdio::piped
|
||||
@@ -26,9 +26,9 @@ use prettytable::format::{Alignment, TableFormat};
|
||||
use prettytable::row;
|
||||
use prettytable::{Attr, Cell, Row, Table};
|
||||
|
||||
use std::str::FromStr;
|
||||
use std::io::BufWriter;
|
||||
use chrono::prelude::*;
|
||||
use std::io::BufWriter;
|
||||
use std::str::FromStr;
|
||||
|
||||
#[macro_use]
|
||||
extern crate lazy_static;
|
||||
@@ -303,7 +303,9 @@ fn main() -> Result<(), Error> {
|
||||
debug!("MAIN: DB opened successfully");
|
||||
|
||||
match mode {
|
||||
KeepModes::Save => crate::modes::save::mode_save(&mut cmd, args, ids, tags, &mut conn, data_path)?,
|
||||
KeepModes::Save => {
|
||||
crate::modes::save::mode_save(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
||||
}
|
||||
KeepModes::Get => {
|
||||
crate::modes::get::mode_get(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
||||
}
|
||||
@@ -312,7 +314,9 @@ fn main() -> Result<(), Error> {
|
||||
KeepModes::Update => {
|
||||
crate::modes::update::mode_update(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
||||
}
|
||||
KeepModes::Info => crate::modes::info::mode_info(&mut cmd, args, ids, tags, &mut conn, data_path)?,
|
||||
KeepModes::Info => {
|
||||
crate::modes::info::mode_info(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
||||
}
|
||||
KeepModes::Delete => {
|
||||
crate::modes::delete::mode_delete(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
||||
}
|
||||
@@ -323,7 +327,6 @@ fn main() -> Result<(), Error> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
fn mode_diff(
|
||||
cmd: &mut clap::Command,
|
||||
_args: Args, // Mark as unused if not needed directly
|
||||
@@ -766,4 +769,3 @@ fn mode_list(
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user