Format import granularity

This commit is contained in:
Austen Adler 2022-02-21 18:30:32 -05:00
parent 4f262eccd5
commit e5b86831d3
4 changed files with 14 additions and 20 deletions

2
rustfmt.toml Normal file
View File

@ -0,0 +1,2 @@
unstable_features = true
imports_granularity = "Crate"

View File

@ -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)]

View File

@ -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;

View File

@ -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 {