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 shuf;
mod sort;
use clap::Parser;
use clap::Subcommand;
use clap::{Parser, Subcommand};
use errors::KakMessage;
use shuf::ShufOptions;
use sort::SortOptions;
use std::env;
use std::fs;
use std::fs::File;
use std::fs::OpenOptions;
use std::io::Write;
use std::str::FromStr;
use std::{
env, fs,
fs::{File, OpenOptions},
io::Write,
str::FromStr,
};
#[derive(Parser, Debug)]
#[clap(about, version, author)]

View File

@ -1,7 +1,5 @@
use crate::KakMessage;
use crate::{kak_response, open_command_fifo};
use rand::seq::SliceRandom;
use rand::thread_rng;
use crate::{kak_response, open_command_fifo, KakMessage};
use rand::{seq::SliceRandom, thread_rng};
use std::io::Write;
#[derive(clap::StructOpt, Debug)]
pub struct ShufOptions;

View File

@ -1,13 +1,8 @@
use crate::KakMessage;
use crate::SelectionDesc;
use crate::{kak_response, open_command_fifo};
use crate::{kak_response, open_command_fifo, KakMessage, SelectionDesc};
use alphanumeric_sort::compare_str;
use rand::seq::SliceRandom;
use rand::thread_rng;
use rand::{seq::SliceRandom, thread_rng};
use regex::Regex;
use std::cmp::Ordering;
use std::io::Write;
use std::str::FromStr;
use std::{cmp::Ordering, io::Write, str::FromStr};
#[derive(clap::StructOpt, Debug)]
pub struct SortOptions {