diff --git a/bin/ref-type/src/main.rs b/bin/ref-type/src/main.rs index 4620220..f0e6407 100644 --- a/bin/ref-type/src/main.rs +++ b/bin/ref-type/src/main.rs @@ -1,5 +1,4 @@ -use regex::Regex; -use structopt::StructOpt; +use {regex::Regex, structopt::StructOpt}; #[derive(StructOpt)] struct Arguments { diff --git a/bin/ref-type/tests/integration.rs b/bin/ref-type/tests/integration.rs index 4c52f21..1675f56 100644 --- a/bin/ref-type/tests/integration.rs +++ b/bin/ref-type/tests/integration.rs @@ -1,5 +1,7 @@ -use executable_path::executable_path; -use std::{process::Command, str}; +use { + executable_path::executable_path, + std::{process::Command, str}, +}; fn stdout(reference: &str) -> String { let output = Command::new(executable_path("ref-type")) diff --git a/src/analyzer.rs b/src/analyzer.rs index 44efb43..53247bb 100644 --- a/src/analyzer.rs +++ b/src/analyzer.rs @@ -1,6 +1,4 @@ -use super::*; - -use CompileErrorKind::*; +use {super::*, CompileErrorKind::*}; const VALID_ALIAS_ATTRIBUTES: [Attribute; 1] = [Attribute::Private]; diff --git a/src/assignment_resolver.rs b/src/assignment_resolver.rs index 173c174..b263db6 100644 --- a/src/assignment_resolver.rs +++ b/src/assignment_resolver.rs @@ -1,6 +1,4 @@ -use super::*; - -use CompileErrorKind::*; +use {super::*, CompileErrorKind::*}; pub(crate) struct AssignmentResolver<'src: 'run, 'run> { assignments: &'run Table<'src, Assignment<'src>>, diff --git a/src/color.rs b/src/color.rs index 26cbca4..2fcad9a 100644 --- a/src/color.rs +++ b/src/color.rs @@ -1,7 +1,8 @@ -use super::*; - -use ansi_term::{ANSIGenericString, Color::*, Prefix, Style, Suffix}; -use atty::Stream; +use { + super::*, + ansi_term::{ANSIGenericString, Color::*, Prefix, Style, Suffix}, + atty::Stream, +}; #[derive(Copy, Clone, Debug, PartialEq)] pub(crate) struct Color { diff --git a/src/config.rs b/src/config.rs index 9416daa..ce9438d 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,6 +1,7 @@ -use super::*; - -use clap::{App, AppSettings, Arg, ArgGroup, ArgMatches, ArgSettings}; +use { + super::*, + clap::{App, AppSettings, Arg, ArgGroup, ArgMatches, ArgSettings}, +}; // These three strings should be kept in sync: pub(crate) const CHOOSER_DEFAULT: &str = "fzf"; diff --git a/src/function.rs b/src/function.rs index 9286e20..525e72e 100644 --- a/src/function.rs +++ b/src/function.rs @@ -1,15 +1,15 @@ #![allow(unknown_lints)] #![allow(clippy::unnecessary_wraps)] -use super::*; - -use heck::{ - ToKebabCase, ToLowerCamelCase, ToShoutyKebabCase, ToShoutySnakeCase, ToSnakeCase, ToTitleCase, - ToUpperCamelCase, +use { + super::*, + heck::{ + ToKebabCase, ToLowerCamelCase, ToShoutyKebabCase, ToShoutySnakeCase, ToSnakeCase, ToTitleCase, + ToUpperCamelCase, + }, + Function::*, }; -use Function::*; - pub(crate) enum Function { Nullary(fn(&FunctionContext) -> Result), Unary(fn(&FunctionContext, &str) -> Result), diff --git a/src/justfile.rs b/src/justfile.rs index 371cea2..1919999 100644 --- a/src/justfile.rs +++ b/src/justfile.rs @@ -1,6 +1,4 @@ -use super::*; - -use serde::Serialize; +use {super::*, serde::Serialize}; #[derive(Debug, PartialEq, Serialize)] pub(crate) struct Justfile<'src> { diff --git a/src/lexer.rs b/src/lexer.rs index 15cfb85..2f30301 100644 --- a/src/lexer.rs +++ b/src/lexer.rs @@ -1,7 +1,4 @@ -use super::*; - -use CompileErrorKind::*; -use TokenKind::*; +use {super::*, CompileErrorKind::*, TokenKind::*}; /// Just language lexer /// diff --git a/src/parser.rs b/src/parser.rs index 41ee820..eeb53df 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -1,6 +1,4 @@ -use super::*; - -use TokenKind::*; +use {super::*, TokenKind::*}; /// Just language parser /// diff --git a/src/recipe.rs b/src/recipe.rs index 40d1fe7..aa1c487 100644 --- a/src/recipe.rs +++ b/src/recipe.rs @@ -1,6 +1,7 @@ -use super::*; - -use std::process::{ExitStatus, Stdio}; +use { + super::*, + std::process::{ExitStatus, Stdio}, +}; /// Return a `Error::Signal` if the process was terminated by a signal, /// otherwise return an `Error::UnknownFailure` diff --git a/src/recipe_resolver.rs b/src/recipe_resolver.rs index dae0ba0..2715acc 100644 --- a/src/recipe_resolver.rs +++ b/src/recipe_resolver.rs @@ -1,6 +1,4 @@ -use super::*; - -use CompileErrorKind::*; +use {super::*, CompileErrorKind::*}; pub(crate) struct RecipeResolver<'src: 'run, 'run> { unresolved_recipes: Table<'src, UnresolvedRecipe<'src>>, diff --git a/src/search.rs b/src/search.rs index 27f99a2..6eb2910 100644 --- a/src/search.rs +++ b/src/search.rs @@ -1,6 +1,4 @@ -use super::*; - -use std::path::Component; +use {super::*, std::path::Component}; const DEFAULT_JUSTFILE_NAME: &str = JUSTFILE_NAMES[0]; const JUSTFILE_NAMES: &[&str] = &["justfile", ".justfile"]; diff --git a/src/summary.rs b/src/summary.rs index 89578b5..f1415f9 100644 --- a/src/summary.rs +++ b/src/summary.rs @@ -12,9 +12,10 @@ //! that changes to just do not inadvertently break or change the interpretation //! of existing justfiles. -use std::{collections::BTreeMap, fs, io, path::Path}; - -use crate::compiler::Compiler; +use { + crate::compiler::Compiler, + std::{collections::BTreeMap, fs, io, path::Path}, +}; mod full { pub(crate) use crate::{ diff --git a/src/table.rs b/src/table.rs index 12ce40b..0c60602 100644 --- a/src/table.rs +++ b/src/table.rs @@ -1,6 +1,4 @@ -use super::*; - -use std::collections::btree_map; +use {super::*, std::collections::btree_map}; #[derive(Debug, PartialEq, Serialize)] #[serde(transparent)] diff --git a/src/testing.rs b/src/testing.rs index 8de5e2f..22eaaeb 100644 --- a/src/testing.rs +++ b/src/testing.rs @@ -1,7 +1,4 @@ -use super::*; - -use crate::compiler::Compiler; -use pretty_assertions::assert_eq; +use {super::*, crate::compiler::Compiler, pretty_assertions::assert_eq}; pub(crate) fn compile(text: &str) -> Justfile { match Compiler::compile(text) { diff --git a/src/tree.rs b/src/tree.rs index 8914562..c005762 100644 --- a/src/tree.rs +++ b/src/tree.rs @@ -1,6 +1,7 @@ -use super::*; - -use std::{borrow::Cow, mem}; +use { + super::*, + std::{borrow::Cow, mem}, +}; /// Construct a `Tree` from a symbolic expression literal. This macro, and the /// Tree type, are only used in the Parser unit tests, providing a concise diff --git a/tests/interrupts.rs b/tests/interrupts.rs index 25e5c0b..012e18a 100644 --- a/tests/interrupts.rs +++ b/tests/interrupts.rs @@ -1,6 +1,7 @@ -use super::*; - -use std::time::{Duration, Instant}; +use { + super::*, + std::time::{Duration, Instant}, +}; fn kill(process_id: u32) { unsafe { diff --git a/tests/test.rs b/tests/test.rs index 6c25362..58c5422 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -1,6 +1,4 @@ -use super::*; - -use pretty_assertions::assert_eq; +use {super::*, pretty_assertions::assert_eq}; macro_rules! test { {