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 nix::fcntl::FdFlag;
|
||||||
use std::io::Read;
|
|
||||||
use nix::unistd::{close, pipe};
|
use nix::unistd::{close, pipe};
|
||||||
use nix::Error as NixError;
|
use nix::Error as NixError;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::io::Read;
|
||||||
use std::os::fd::FromRawFd;
|
use std::os::fd::FromRawFd;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::process::Stdio; // For Stdio::null, Stdio::piped
|
use std::process::Stdio; // For Stdio::null, Stdio::piped
|
||||||
@@ -26,9 +26,9 @@ use prettytable::format::{Alignment, TableFormat};
|
|||||||
use prettytable::row;
|
use prettytable::row;
|
||||||
use prettytable::{Attr, Cell, Row, Table};
|
use prettytable::{Attr, Cell, Row, Table};
|
||||||
|
|
||||||
use std::str::FromStr;
|
|
||||||
use std::io::BufWriter;
|
|
||||||
use chrono::prelude::*;
|
use chrono::prelude::*;
|
||||||
|
use std::io::BufWriter;
|
||||||
|
use std::str::FromStr;
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate lazy_static;
|
extern crate lazy_static;
|
||||||
@@ -303,7 +303,9 @@ fn main() -> Result<(), Error> {
|
|||||||
debug!("MAIN: DB opened successfully");
|
debug!("MAIN: DB opened successfully");
|
||||||
|
|
||||||
match mode {
|
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 => {
|
KeepModes::Get => {
|
||||||
crate::modes::get::mode_get(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
crate::modes::get::mode_get(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
||||||
}
|
}
|
||||||
@@ -312,7 +314,9 @@ fn main() -> Result<(), Error> {
|
|||||||
KeepModes::Update => {
|
KeepModes::Update => {
|
||||||
crate::modes::update::mode_update(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
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 => {
|
KeepModes::Delete => {
|
||||||
crate::modes::delete::mode_delete(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
crate::modes::delete::mode_delete(&mut cmd, args, ids, tags, &mut conn, data_path)?
|
||||||
}
|
}
|
||||||
@@ -323,7 +327,6 @@ fn main() -> Result<(), Error> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fn mode_diff(
|
fn mode_diff(
|
||||||
cmd: &mut clap::Command,
|
cmd: &mut clap::Command,
|
||||||
_args: Args, // Mark as unused if not needed directly
|
_args: Args, // Mark as unused if not needed directly
|
||||||
@@ -766,4 +769,3 @@ fn mode_list(
|
|||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user