style: reorder imports and adjust formatting
This commit is contained in:
committed by
Andrew Phillips (aider)
parent
97d89196ab
commit
6bbc306c23
@@ -52,15 +52,15 @@ pub fn get_format_box_chars_no_border_line_separator() -> TableFormat {
|
||||
.borders('│')
|
||||
.separators(
|
||||
&[prettytable::format::LinePosition::Top],
|
||||
prettytable::format::LineSeparator::new('─', '┬', '┌', '┐')
|
||||
prettytable::format::LineSeparator::new('─', '┬', '┌', '┐'),
|
||||
)
|
||||
.separators(
|
||||
&[prettytable::format::LinePosition::Title],
|
||||
prettytable::format::LineSeparator::new('─', '┼', '├', '┤')
|
||||
prettytable::format::LineSeparator::new('─', '┼', '├', '┤'),
|
||||
)
|
||||
.separators(
|
||||
&[prettytable::format::LinePosition::Bottom],
|
||||
prettytable::format::LineSeparator::new('─', '┴', '└', '┘')
|
||||
prettytable::format::LineSeparator::new('─', '┴', '└', '┘'),
|
||||
)
|
||||
.padding(1, 1)
|
||||
.build()
|
||||
|
||||
@@ -4,12 +4,12 @@ use clap::Command;
|
||||
use std::path::PathBuf;
|
||||
use std::str::FromStr;
|
||||
|
||||
use crate::modes::common::{format_size, get_format_box_chars_no_border_line_separator}; // Add function import
|
||||
use is_terminal::IsTerminal;
|
||||
use crate::compression::get_engine;
|
||||
use crate::compression::CompressionType;
|
||||
use crate::db::{get_item, get_item_last, get_item_matching};
|
||||
use crate::modes::common::{format_size, get_format_box_chars_no_border_line_separator}; // Add function import
|
||||
use chrono::prelude::*;
|
||||
use is_terminal::IsTerminal;
|
||||
use prettytable::format;
|
||||
use prettytable::{Attr, Cell, Row, Table};
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
use anyhow::{anyhow, Result};
|
||||
use log::debug;
|
||||
use chrono::Local;
|
||||
use prettytable::format::consts;
|
||||
use clap::Command;
|
||||
use log::debug;
|
||||
use prettytable::format::consts;
|
||||
use std::collections::HashMap;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::db::{get_item, get_item_last, get_items, get_items_matching, Item, Tag, Meta};
|
||||
use std::io::{ErrorKind};
|
||||
use crate::db::{get_item, get_item_last, get_items, get_items_matching, Item, Meta, Tag};
|
||||
use crate::modes::common::{format_size, get_format_box_chars_no_border_line_separator};
|
||||
use rusqlite::Connection;
|
||||
use crate::modes::common::{size_column, string_column};
|
||||
use prettytable::row;
|
||||
use prettytable::{Attr, Cell, Row, Table};
|
||||
use rusqlite::Connection;
|
||||
use std::io::ErrorKind;
|
||||
|
||||
pub fn mode_list(
|
||||
cmd: &mut Command,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use is_terminal::IsTerminal;
|
||||
use std::collections::HashMap;
|
||||
use std::io::{self, Read};
|
||||
use std::path::PathBuf;
|
||||
use is_terminal::IsTerminal;
|
||||
use std::str::FromStr;
|
||||
|
||||
use clap::error::ErrorKind;
|
||||
@@ -12,7 +12,7 @@ use rusqlite::Connection;
|
||||
|
||||
use crate::compression::CompressionType;
|
||||
use crate::db::{self};
|
||||
use crate::modes::common::{get_meta_from_env};
|
||||
use crate::modes::common::get_meta_from_env;
|
||||
use chrono::Utc;
|
||||
|
||||
pub fn mode_save(
|
||||
@@ -40,7 +40,7 @@ pub fn mode_save(
|
||||
.compression
|
||||
.unwrap_or(compression::default_type().to_string());
|
||||
|
||||
use gethostname::gethostname;
|
||||
use gethostname::gethostname;
|
||||
use std::io::Write;
|
||||
let compression_type_opt = CompressionType::from_str(&compression_name);
|
||||
if compression_type_opt.is_err() {
|
||||
@@ -119,7 +119,7 @@ use gethostname::gethostname;
|
||||
let mut stdout = io::stdout().lock();
|
||||
let mut buffer = [0; libc::BUFSIZ as usize];
|
||||
|
||||
use crate::compression;
|
||||
use crate::compression;
|
||||
let compression_engine = compression::get_engine(compression_type.clone())
|
||||
.expect("Unable to get compression engine");
|
||||
let mut item_out: Box<dyn Write> =
|
||||
|
||||
Reference in New Issue
Block a user