Format import granularity
This commit is contained in:
parent
4f262eccd5
commit
e5b86831d3
2
rustfmt.toml
Normal file
2
rustfmt.toml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
unstable_features = true
|
||||||
|
imports_granularity = "Crate"
|
15
src/main.rs
15
src/main.rs
@ -4,17 +4,16 @@
|
|||||||
mod errors;
|
mod errors;
|
||||||
mod shuf;
|
mod shuf;
|
||||||
mod sort;
|
mod sort;
|
||||||
use clap::Parser;
|
use clap::{Parser, Subcommand};
|
||||||
use clap::Subcommand;
|
|
||||||
use errors::KakMessage;
|
use errors::KakMessage;
|
||||||
use shuf::ShufOptions;
|
use shuf::ShufOptions;
|
||||||
use sort::SortOptions;
|
use sort::SortOptions;
|
||||||
use std::env;
|
use std::{
|
||||||
use std::fs;
|
env, fs,
|
||||||
use std::fs::File;
|
fs::{File, OpenOptions},
|
||||||
use std::fs::OpenOptions;
|
io::Write,
|
||||||
use std::io::Write;
|
str::FromStr,
|
||||||
use std::str::FromStr;
|
};
|
||||||
|
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[clap(about, version, author)]
|
#[clap(about, version, author)]
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
use crate::KakMessage;
|
use crate::{kak_response, open_command_fifo, KakMessage};
|
||||||
use crate::{kak_response, open_command_fifo};
|
use rand::{seq::SliceRandom, thread_rng};
|
||||||
use rand::seq::SliceRandom;
|
|
||||||
use rand::thread_rng;
|
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
#[derive(clap::StructOpt, Debug)]
|
#[derive(clap::StructOpt, Debug)]
|
||||||
pub struct ShufOptions;
|
pub struct ShufOptions;
|
||||||
|
11
src/sort.rs
11
src/sort.rs
@ -1,13 +1,8 @@
|
|||||||
use crate::KakMessage;
|
use crate::{kak_response, open_command_fifo, KakMessage, SelectionDesc};
|
||||||
use crate::SelectionDesc;
|
|
||||||
use crate::{kak_response, open_command_fifo};
|
|
||||||
use alphanumeric_sort::compare_str;
|
use alphanumeric_sort::compare_str;
|
||||||
use rand::seq::SliceRandom;
|
use rand::{seq::SliceRandom, thread_rng};
|
||||||
use rand::thread_rng;
|
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use std::cmp::Ordering;
|
use std::{cmp::Ordering, io::Write, str::FromStr};
|
||||||
use std::io::Write;
|
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
#[derive(clap::StructOpt, Debug)]
|
#[derive(clap::StructOpt, Debug)]
|
||||||
pub struct SortOptions {
|
pub struct SortOptions {
|
||||||
|
Loading…
Reference in New Issue
Block a user