Repository: casey/just
Pull request #1239 (2022-06-19 04:52:34)

Do `use super::*;` instead of `use crate::common::*;`
I've switched to preferring to put imports in the crate root, and then doing `use super::*` everywhere instead of `use crate::common:*`;

`use super::*` is shorter, and the strategy of always importing the super crate is compatible with nested modules.


Patch:
diff --git a/src/alias.rs b/src/alias.rs
index e198e5a1..f543abbb 100644
--- a/src/alias.rs
+++ b/src/alias.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// An alias, e.g. `name := target`
 #[derive(Debug, PartialEq, Clone, Serialize)]
diff --git a/src/analyzer.rs b/src/analyzer.rs
index 1f6d6576..39e03a5e 100644
--- a/src/analyzer.rs
+++ b/src/analyzer.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use CompileErrorKind::*;
 
diff --git a/src/assignment.rs b/src/assignment.rs
index 5ea7bc18..6dab1a96 100644
--- a/src/assignment.rs
+++ b/src/assignment.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// An assignment, e.g `foo := bar`
 pub(crate) type Assignment<'src> = Binding<'src, Expression<'src>>;
diff --git a/src/assignment_resolver.rs b/src/assignment_resolver.rs
index 645ec848..3f07ba40 100644
--- a/src/assignment_resolver.rs
+++ b/src/assignment_resolver.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use CompileErrorKind::*;
 
diff --git a/src/ast.rs b/src/ast.rs
index 5dfe982e..cca0f63c 100644
--- a/src/ast.rs
+++ b/src/ast.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// The top-level type produced by the parser. Not all successful parses result
 /// in valid justfiles, so additional consistency checks and name resolution
diff --git a/src/binding.rs b/src/binding.rs
index 77c1f9c8..73b64c21 100644
--- a/src/binding.rs
+++ b/src/binding.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// A binding of `name` to `value`
 #[derive(Debug, Clone, PartialEq, Serialize)]
diff --git a/src/color.rs b/src/color.rs
index faeea38e..26cbca4d 100644
--- a/src/color.rs
+++ b/src/color.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use ansi_term::{ANSIGenericString, Color::*, Prefix, Style, Suffix};
 use atty::Stream;
diff --git a/src/color_display.rs b/src/color_display.rs
index b9eab60a..4729621f 100644
--- a/src/color_display.rs
+++ b/src/color_display.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) trait ColorDisplay {
   fn color_display<'a>(&'a self, color: Color) -> Wrapper<'a>
diff --git a/src/command_ext.rs b/src/command_ext.rs
index f3ae8798..a317e6fc 100644
--- a/src/command_ext.rs
+++ b/src/command_ext.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) trait CommandExt {
   fn export(&mut self, settings: &Settings, dotenv: &BTreeMap<String, String>, scope: &Scope);
diff --git a/src/common.rs b/src/common.rs
deleted file mode 100644
index 678d759f..00000000
--- a/src/common.rs
+++ /dev/null
@@ -1,86 +0,0 @@
-// stdlib
-pub(crate) use std::{
-  cmp,
-  collections::{BTreeMap, BTreeSet},
-  env,
-  ffi::{OsStr, OsString},
-  fmt::{self, Debug, Display, Formatter},
-  fs,
-  io::{self, Cursor, Write},
-  iter::{self, FromIterator},
-  mem,
-  ops::{Index, Range, RangeInclusive},
-  path::{self, Path, PathBuf},
-  process::{self, Command, ExitStatus, Stdio},
-  rc::Rc,
-  str::{self, Chars},
-  sync::{Mutex, MutexGuard},
-  usize, vec,
-};
-
-// dependencies
-pub(crate) use ::{
-  camino::Utf8Path,
-  derivative::Derivative,
-  edit_distance::edit_distance,
-  lexiclean::Lexiclean,
-  libc::EXIT_FAILURE,
-  log::{info, warn},
-  regex::Regex,
-  serde::{
-    ser::{SerializeMap, SerializeSeq},
-    Serialize, Serializer,
-  },
-  snafu::{ResultExt, Snafu},
-  strum::{Display, EnumString, IntoStaticStr},
-  typed_arena::Arena,
-  unicode_width::{UnicodeWidthChar, UnicodeWidthStr},
-};
-
-// modules
-pub(crate) use crate::{completions, config, config_error, keyed};
-
-// functions
-pub(crate) use crate::{load_dotenv::load_dotenv, output::output, unindent::unindent};
-
-// traits
-pub(crate) use crate::{
-  color_display::ColorDisplay, command_ext::CommandExt, keyed::Keyed, ordinal::Ordinal,
-  platform_interface::PlatformInterface, range_ext::RangeExt,
-};
-
-// structs and enums
-pub(crate) use crate::{
-  alias::Alias, analyzer::Analyzer, assignment::Assignment,
-  assignment_resolver::AssignmentResolver, ast::Ast, binding::Binding, color::Color,
-  compile_error::CompileError, compile_error_kind::CompileErrorKind,
-  conditional_operator::ConditionalOperator, config::Config, config_error::ConfigError,
-  count::Count, delimiter::Delimiter, dependency::Dependency, dump_format::DumpFormat,
-  enclosure::Enclosure, error::Error, evaluator::Evaluator, expression::Expression,
-  fragment::Fragment, function::Function, function_context::FunctionContext,
-  interrupt_guard::InterruptGuard, interrupt_handler::InterruptHandler, item::Item,
-  justfile::Justfile, keyword::Keyword, lexer::Lexer, line::Line, list::List, loader::Loader,
-  name::Name, output_error::OutputError, parameter::Parameter, parameter_kind::ParameterKind,
-  parser::Parser, platform::Platform, position::Position, positional::Positional, recipe::Recipe,
-  recipe_context::RecipeContext, recipe_resolver::RecipeResolver, scope::Scope, search::Search,
-  search_config::SearchConfig, search_error::SearchError, set::Set, setting::Setting,
-  settings::Settings, shebang::Shebang, shell::Shell, show_whitespace::ShowWhitespace,
-  string_kind::StringKind, string_literal::StringLiteral, subcommand::Subcommand,
-  suggestion::Suggestion, table::Table, thunk::Thunk, token::Token, token_kind::TokenKind,
-  unresolved_dependency::UnresolvedDependency, unresolved_recipe::UnresolvedRecipe,
-  use_color::UseColor, variables::Variables, verbosity::Verbosity, warning::Warning,
-};
-
-// type aliases
-pub(crate) type CompileResult<'a, T> = Result<T, CompileError<'a>>;
-pub(crate) type ConfigResult<T> = Result<T, ConfigError>;
-pub(crate) type RunResult<'a, T> = Result<T, Error<'a>>;
-pub(crate) type SearchResult<T> = Result<T, SearchError>;
-
-// modules used in tests
-#[cfg(test)]
-pub(crate) use crate::testing;
-
-// structs and enums used in tests
-#[cfg(test)]
-pub(crate) use crate::{node::Node, tree::Tree};
diff --git a/src/compile_error.rs b/src/compile_error.rs
index 5fe4d3e7..ba8d09eb 100644
--- a/src/compile_error.rs
+++ b/src/compile_error.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, PartialEq)]
 pub(crate) struct CompileError<'src> {
diff --git a/src/compile_error_kind.rs b/src/compile_error_kind.rs
index 76ba82c6..062659ba 100644
--- a/src/compile_error_kind.rs
+++ b/src/compile_error_kind.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, PartialEq)]
 pub(crate) enum CompileErrorKind<'src> {
diff --git a/src/compiler.rs b/src/compiler.rs
index f19536eb..2164856a 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) struct Compiler;
 
diff --git a/src/conditional_operator.rs b/src/conditional_operator.rs
index 802be9fc..bb297c22 100644
--- a/src/conditional_operator.rs
+++ b/src/conditional_operator.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// A conditional expression operator.
 #[derive(PartialEq, Debug, Copy, Clone)]
diff --git a/src/config.rs b/src/config.rs
index 7dd68470..2a1085f7 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use clap::{App, AppSettings, Arg, ArgGroup, ArgMatches, ArgSettings};
 
diff --git a/src/config_error.rs b/src/config_error.rs
index af14c007..84f844a5 100644
--- a/src/config_error.rs
+++ b/src/config_error.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, Snafu)]
 #[snafu(visibility(pub(crate)), context(suffix(Context)))]
diff --git a/src/count.rs b/src/count.rs
index 84f52e65..b6504c99 100644
--- a/src/count.rs
+++ b/src/count.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub struct Count<T: Display>(pub T, pub usize);
 
diff --git a/src/dependency.rs b/src/dependency.rs
index d3c470f2..3039949b 100644
--- a/src/dependency.rs
+++ b/src/dependency.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(PartialEq, Debug, Serialize)]
 pub(crate) struct Dependency<'src> {
diff --git a/src/enclosure.rs b/src/enclosure.rs
index a9ac31a8..12c715b7 100644
--- a/src/enclosure.rs
+++ b/src/enclosure.rs
@@ -1,7 +1,7 @@
 // `Self` cannot be used where type takes generic arguments
 #![allow(clippy::use_self)]
 
-use crate::common::*;
+use super::*;
 
 pub struct Enclosure<T: Display> {
   enclosure: &'static str,
diff --git a/src/error.rs b/src/error.rs
index c7025493..e28a231c 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug)]
 pub(crate) enum Error<'src> {
diff --git a/src/evaluator.rs b/src/evaluator.rs
index 10aaba8e..048828d0 100644
--- a/src/evaluator.rs
+++ b/src/evaluator.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) struct Evaluator<'src: 'run, 'run> {
   assignments: Option<&'run Table<'src, Assignment<'src>>>,
diff --git a/src/expression.rs b/src/expression.rs
index 8b849587..5b792682 100644
--- a/src/expression.rs
+++ b/src/expression.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// An expression. Note that the Just language grammar has both an `expression`
 /// production of additions (`a + b`) and values, and a `value` production of
diff --git a/src/fragment.rs b/src/fragment.rs
index e4d73e38..04a6b9e3 100644
--- a/src/fragment.rs
+++ b/src/fragment.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// A line fragment consisting either of…
 #[derive(PartialEq, Debug, Clone)]
diff --git a/src/function.rs b/src/function.rs
index 71550981..6ea88f41 100644
--- a/src/function.rs
+++ b/src/function.rs
@@ -1,7 +1,7 @@
 #![allow(unknown_lints)]
 #![allow(clippy::unnecessary_wraps)]
 
-use crate::common::*;
+use super::*;
 
 use Function::*;
 pub(crate) enum Function {
diff --git a/src/function_context.rs b/src/function_context.rs
index 3a5a4353..986d3fea 100644
--- a/src/function_context.rs
+++ b/src/function_context.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) struct FunctionContext<'run> {
   pub(crate) dotenv: &'run BTreeMap<String, String>,
diff --git a/src/fuzzing.rs b/src/fuzzing.rs
index 54bba266..a1a2c135 100644
--- a/src/fuzzing.rs
+++ b/src/fuzzing.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) fn compile(text: &str) {
   if let Err(error) = Parser::parse(text) {
diff --git a/src/interrupt_guard.rs b/src/interrupt_guard.rs
index 7f3faed4..23afa1dd 100644
--- a/src/interrupt_guard.rs
+++ b/src/interrupt_guard.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) struct InterruptGuard;
 
diff --git a/src/interrupt_handler.rs b/src/interrupt_handler.rs
index a1eb18d9..55f3e3a1 100644
--- a/src/interrupt_handler.rs
+++ b/src/interrupt_handler.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) struct InterruptHandler {
   blocks: u32,
diff --git a/src/item.rs b/src/item.rs
index 2e527c79..7bc8cf10 100644
--- a/src/item.rs
+++ b/src/item.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// A single top-level item
 #[derive(Debug, Clone)]
diff --git a/src/justfile.rs b/src/justfile.rs
index 4dadb786..ccad90a7 100644
--- a/src/justfile.rs
+++ b/src/justfile.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use serde::Serialize;
 
diff --git a/src/keyed.rs b/src/keyed.rs
index 79405f7e..e171451e 100644
--- a/src/keyed.rs
+++ b/src/keyed.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) trait Keyed<'key> {
   fn key(&self) -> &'key str;
diff --git a/src/keyword.rs b/src/keyword.rs
index 11fdca1b..2913e711 100644
--- a/src/keyword.rs
+++ b/src/keyword.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, Eq, PartialEq, IntoStaticStr, Display, Copy, Clone, EnumString)]
 #[strum(serialize_all = "kebab_case")]
diff --git a/src/lexer.rs b/src/lexer.rs
index ee9751ba..09a89d92 100644
--- a/src/lexer.rs
+++ b/src/lexer.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use CompileErrorKind::*;
 use TokenKind::*;
diff --git a/src/lib.rs b/src/lib.rs
index c758c5de..3a11a4f1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -14,12 +14,81 @@
   clippy::wildcard_imports
 )]
 
+pub(crate) use {
+  crate::{
+    alias::Alias, analyzer::Analyzer, assignment::Assignment,
+    assignment_resolver::AssignmentResolver, ast::Ast, binding::Binding, color::Color,
+    color_display::ColorDisplay, command_ext::CommandExt, compile_error::CompileError,
+    compile_error_kind::CompileErrorKind, conditional_operator::ConditionalOperator,
+    config::Config, config_error::ConfigError, count::Count, delimiter::Delimiter,
+    dependency::Dependency, dump_format::DumpFormat, enclosure::Enclosure, error::Error,
+    evaluator::Evaluator, expression::Expression, fragment::Fragment, function::Function,
+    function_context::FunctionContext, interrupt_guard::InterruptGuard,
+    interrupt_handler::InterruptHandler, item::Item, justfile::Justfile, keyed::Keyed,
+    keyword::Keyword, lexer::Lexer, line::Line, list::List, load_dotenv::load_dotenv,
+    loader::Loader, name::Name, ordinal::Ordinal, output::output, output_error::OutputError,
+    parameter::Parameter, parameter_kind::ParameterKind, parser::Parser, platform::Platform,
+    platform_interface::PlatformInterface, position::Position, positional::Positional,
+    range_ext::RangeExt, recipe::Recipe, recipe_context::RecipeContext,
+    recipe_resolver::RecipeResolver, scope::Scope, search::Search, search_config::SearchConfig,
+    search_error::SearchError, set::Set, setting::Setting, settings::Settings, shebang::Shebang,
+    shell::Shell, show_whitespace::ShowWhitespace, string_kind::StringKind,
+    string_literal::StringLiteral, subcommand::Subcommand, suggestion::Suggestion, table::Table,
+    thunk::Thunk, token::Token, token_kind::TokenKind, unresolved_dependency::UnresolvedDependency,
+    unresolved_recipe::UnresolvedRecipe, use_color::UseColor, variables::Variables,
+    verbosity::Verbosity, warning::Warning,
+  },
+  std::{
+    cmp,
+    collections::{BTreeMap, BTreeSet},
+    env,
+    ffi::{OsStr, OsString},
+    fmt::{self, Debug, Display, Formatter},
+    fs,
+    io::{self, Cursor, Write},
+    iter::{self, FromIterator},
+    mem,
+    ops::{Index, Range, RangeInclusive},
+    path::{self, Path, PathBuf},
+    process::{self, Command, ExitStatus, Stdio},
+    rc::Rc,
+    str::{self, Chars},
+    sync::{Mutex, MutexGuard},
+    usize, vec,
+  },
+  {
+    camino::Utf8Path,
+    derivative::Derivative,
+    edit_distance::edit_distance,
+    lexiclean::Lexiclean,
+    libc::EXIT_FAILURE,
+    log::{info, warn},
+    regex::Regex,
+    serde::{
+      ser::{SerializeMap, SerializeSeq},
+      Serialize, Serializer,
+    },
+    snafu::{ResultExt, Snafu},
+    strum::{Display, EnumString, IntoStaticStr},
+    typed_arena::Arena,
+    unicode_width::{UnicodeWidthChar, UnicodeWidthStr},
+  },
+};
+
+#[cfg(test)]
+pub(crate) use crate::{node::Node, tree::Tree};
+
 pub use crate::run::run;
 
 // Used in integration tests.
 #[doc(hidden)]
 pub use unindent::unindent;
 
+pub(crate) type CompileResult<'a, T> = Result<T, CompileError<'a>>;
+pub(crate) type ConfigResult<T> = Result<T, ConfigError>;
+pub(crate) type RunResult<'a, T> = Result<T, Error<'a>>;
+pub(crate) type SearchResult<T> = Result<T, SearchError>;
+
 #[macro_use]
 extern crate lazy_static;
 
@@ -52,7 +121,6 @@ mod binding;
 mod color;
 mod color_display;
 mod command_ext;
-mod common;
 mod compile_error;
 mod compile_error_kind;
 mod compiler;
diff --git a/src/line.rs b/src/line.rs
index 878cb8cd..6f26506d 100644
--- a/src/line.rs
+++ b/src/line.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// A single line in a recipe body, consisting of any number of `Fragment`s.
 #[derive(Debug, Clone, PartialEq, Serialize)]
diff --git a/src/list.rs b/src/list.rs
index 36da9bc7..f96167d0 100644
--- a/src/list.rs
+++ b/src/list.rs
@@ -1,7 +1,7 @@
 // `Self` cannot be used where type takes generic arguments
 #![allow(clippy::use_self)]
 
-use crate::common::*;
+use super::*;
 
 pub struct List<T: Display, I: Iterator<Item = T> + Clone> {
   conjunction: &'static str,
diff --git a/src/load_dotenv.rs b/src/load_dotenv.rs
index 74ec11b7..b738e61e 100644
--- a/src/load_dotenv.rs
+++ b/src/load_dotenv.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 const DEFAULT_DOTENV_FILENAME: &str = ".env";
 
diff --git a/src/loader.rs b/src/loader.rs
index 37bd1c89..95fa7c34 100644
--- a/src/loader.rs
+++ b/src/loader.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) struct Loader {
   arena: Arena<String>,
diff --git a/src/name.rs b/src/name.rs
index e9093b95..aec425fd 100644
--- a/src/name.rs
+++ b/src/name.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// A name. This is effectively just a `Token` of kind `Identifier`, but we give
 /// it its own type for clarity.
diff --git a/src/node.rs b/src/node.rs
index 539c355c..02f6a007 100644
--- a/src/node.rs
+++ b/src/node.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// Methods common to all AST nodes. Currently only used in parser unit tests.
 pub(crate) trait Node<'src> {
diff --git a/src/output.rs b/src/output.rs
index 8b5e2a34..f447ccc9 100644
--- a/src/output.rs
+++ b/src/output.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// Run a command and return the data it wrote to stdout as a string
 pub(crate) fn output(mut command: Command) -> Result<String, OutputError> {
diff --git a/src/output_error.rs b/src/output_error.rs
index 10e44a00..00d80afb 100644
--- a/src/output_error.rs
+++ b/src/output_error.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug)]
 pub(crate) enum OutputError {
diff --git a/src/parameter.rs b/src/parameter.rs
index 257c83eb..fb55d2cd 100644
--- a/src/parameter.rs
+++ b/src/parameter.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// A single function parameter
 #[derive(PartialEq, Debug, Clone, Serialize)]
diff --git a/src/parameter_kind.rs b/src/parameter_kind.rs
index 86512098..cc49cba4 100644
--- a/src/parameter_kind.rs
+++ b/src/parameter_kind.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// Parameters can either be…
 #[derive(Debug, Copy, Clone, Eq, PartialEq, Serialize)]
diff --git a/src/parser.rs b/src/parser.rs
index 9e94828c..9f77de4c 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use TokenKind::*;
 
diff --git a/src/platform.rs b/src/platform.rs
index ad5b702a..e84dcce8 100644
--- a/src/platform.rs
+++ b/src/platform.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) struct Platform;
 
diff --git a/src/platform_interface.rs b/src/platform_interface.rs
index 0d78edc8..fcab222b 100644
--- a/src/platform_interface.rs
+++ b/src/platform_interface.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) trait PlatformInterface {
   /// Construct a command equivalent to running the script at `path` with the
diff --git a/src/positional.rs b/src/positional.rs
index 0c9d83c4..79b318eb 100644
--- a/src/positional.rs
+++ b/src/positional.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// A struct containing the parsed representation of positional command-line
 /// arguments, i.e. arguments that are not flags, options, or the subcommand.
diff --git a/src/range_ext.rs b/src/range_ext.rs
index 325e5b91..2a96064e 100644
--- a/src/range_ext.rs
+++ b/src/range_ext.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) trait RangeExt<T> {
   fn range_contains(&self, i: &T) -> bool;
diff --git a/src/recipe.rs b/src/recipe.rs
index 6a206e1f..0b4ee366 100644
--- a/src/recipe.rs
+++ b/src/recipe.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use std::process::{ExitStatus, Stdio};
 
diff --git a/src/recipe_context.rs b/src/recipe_context.rs
index 0c0dc344..b254440f 100644
--- a/src/recipe_context.rs
+++ b/src/recipe_context.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) struct RecipeContext<'src: 'run, 'run> {
   pub(crate) config: &'run Config,
diff --git a/src/recipe_resolver.rs b/src/recipe_resolver.rs
index cc8ad7d2..dae0ba02 100644
--- a/src/recipe_resolver.rs
+++ b/src/recipe_resolver.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use CompileErrorKind::*;
 
diff --git a/src/run.rs b/src/run.rs
index 5a0f9231..73be1b51 100644
--- a/src/run.rs
+++ b/src/run.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub fn run() -> Result<(), i32> {
   #[cfg(windows)]
diff --git a/src/scope.rs b/src/scope.rs
index 9f1913a0..f78ce570 100644
--- a/src/scope.rs
+++ b/src/scope.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug)]
 pub(crate) struct Scope<'src: 'run, 'run> {
diff --git a/src/search.rs b/src/search.rs
index eaf42f0b..06cf1dd7 100644
--- a/src/search.rs
+++ b/src/search.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use std::path::Component;
 
diff --git a/src/search_config.rs b/src/search_config.rs
index b9d4f9fe..3af178a3 100644
--- a/src/search_config.rs
+++ b/src/search_config.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// Controls how `just` will search for the justfile.
 #[derive(Debug, PartialEq)]
diff --git a/src/search_error.rs b/src/search_error.rs
index 1dfabb23..3ee783ec 100644
--- a/src/search_error.rs
+++ b/src/search_error.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, Snafu)]
 #[snafu(visibility(pub(crate)))]
diff --git a/src/set.rs b/src/set.rs
index 0925b07e..45e5808f 100644
--- a/src/set.rs
+++ b/src/set.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, Clone)]
 pub(crate) struct Set<'src> {
diff --git a/src/setting.rs b/src/setting.rs
index 3646347f..6349cabd 100644
--- a/src/setting.rs
+++ b/src/setting.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, Clone)]
 pub(crate) enum Setting<'src> {
diff --git a/src/settings.rs b/src/settings.rs
index b6b74079..ae3767fa 100644
--- a/src/settings.rs
+++ b/src/settings.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) const DEFAULT_SHELL: &str = "sh";
 pub(crate) const DEFAULT_SHELL_ARGS: &[&str] = &["-cu"];
diff --git a/src/shell.rs b/src/shell.rs
index cc463c2f..eebdfaac 100644
--- a/src/shell.rs
+++ b/src/shell.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, Clone, PartialEq, Serialize)]
 pub(crate) struct Shell<'src> {
diff --git a/src/show_whitespace.rs b/src/show_whitespace.rs
index dd24f07f..65c6902a 100644
--- a/src/show_whitespace.rs
+++ b/src/show_whitespace.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 /// String wrapper that uses nonblank characters to display spaces and tabs
 pub struct ShowWhitespace<'str>(pub &'str str);
diff --git a/src/string_kind.rs b/src/string_kind.rs
index 07bd23b7..edfbe46c 100644
--- a/src/string_kind.rs
+++ b/src/string_kind.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, PartialEq, Clone, Copy, Ord, PartialOrd, Eq)]
 pub(crate) struct StringKind {
diff --git a/src/string_literal.rs b/src/string_literal.rs
index 272642bf..47459cfc 100644
--- a/src/string_literal.rs
+++ b/src/string_literal.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(PartialEq, Debug, Clone)]
 pub(crate) struct StringLiteral<'src> {
diff --git a/src/subcommand.rs b/src/subcommand.rs
index eabb2330..ea7e9e53 100644
--- a/src/subcommand.rs
+++ b/src/subcommand.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 const INIT_JUSTFILE: &str = "default:\n    echo 'Hello, world!'\n";
 
diff --git a/src/suggestion.rs b/src/suggestion.rs
index 41eecedb..7db586ac 100644
--- a/src/suggestion.rs
+++ b/src/suggestion.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Clone, Copy, Debug, PartialEq)]
 pub(crate) struct Suggestion<'src> {
diff --git a/src/table.rs b/src/table.rs
index dfc2eace..12ce40b3 100644
--- a/src/table.rs
+++ b/src/table.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use std::collections::btree_map;
 
diff --git a/src/thunk.rs b/src/thunk.rs
index f18c3891..14206f89 100644
--- a/src/thunk.rs
+++ b/src/thunk.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Derivative)]
 #[derivative(Debug, Clone, PartialEq = "feature_allow_slow_enum")]
diff --git a/src/token.rs b/src/token.rs
index 62190bd5..d86cef66 100644
--- a/src/token.rs
+++ b/src/token.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, PartialEq, Clone, Copy)]
 pub(crate) struct Token<'src> {
diff --git a/src/token_kind.rs b/src/token_kind.rs
index 79139bb6..c36edf50 100644
--- a/src/token_kind.rs
+++ b/src/token_kind.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Debug, PartialEq, Clone, Copy, Ord, PartialOrd, Eq)]
 pub(crate) enum TokenKind {
diff --git a/src/tree.rs b/src/tree.rs
index 99f67aa9..d72d0f93 100644
--- a/src/tree.rs
+++ b/src/tree.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use std::{borrow::Cow, mem};
 
diff --git a/src/unresolved_dependency.rs b/src/unresolved_dependency.rs
index 47a9e9a4..cbe880e9 100644
--- a/src/unresolved_dependency.rs
+++ b/src/unresolved_dependency.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(PartialEq, Debug, Clone)]
 pub(crate) struct UnresolvedDependency<'src> {
diff --git a/src/unresolved_recipe.rs b/src/unresolved_recipe.rs
index 649d8f59..81f689ba 100644
--- a/src/unresolved_recipe.rs
+++ b/src/unresolved_recipe.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) type UnresolvedRecipe<'src> = Recipe<'src, UnresolvedDependency<'src>>;
 
diff --git a/src/variables.rs b/src/variables.rs
index e56a278b..1b634df6 100644
--- a/src/variables.rs
+++ b/src/variables.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) struct Variables<'expression, 'src> {
   stack: Vec<&'expression Expression<'src>>,
diff --git a/src/warning.rs b/src/warning.rs
index cfb11a49..9d6c053b 100644
--- a/src/warning.rs
+++ b/src/warning.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[derive(Clone, Debug, PartialEq)]
 pub(crate) enum Warning {}


Test patch:
diff --git a/src/testing.rs b/src/testing.rs
index caeaa1e0..121f15fc 100644
--- a/src/testing.rs
+++ b/src/testing.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use crate::compiler::Compiler;
 use pretty_assertions::assert_eq;
diff --git a/tests/allow_duplicate_recipes.rs b/tests/allow_duplicate_recipes.rs
index d597ce0c..9e873e4d 100644
--- a/tests/allow_duplicate_recipes.rs
+++ b/tests/allow_duplicate_recipes.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn allow_duplicate_recipes() {
diff --git a/tests/assert_stdout.rs b/tests/assert_stdout.rs
index 05f2b9b9..dd1b2d5a 100644
--- a/tests/assert_stdout.rs
+++ b/tests/assert_stdout.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) fn assert_stdout(output: &Output, stdout: &str) {
   assert_success(output);
diff --git a/tests/assert_success.rs b/tests/assert_success.rs
index 0f4ddab5..3026b67b 100644
--- a/tests/assert_success.rs
+++ b/tests/assert_success.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 pub(crate) fn assert_success(output: &Output) {
   if !output.status.success() {
diff --git a/tests/byte_order_mark.rs b/tests/byte_order_mark.rs
index 676aefa1..906f49d9 100644
--- a/tests/byte_order_mark.rs
+++ b/tests/byte_order_mark.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn ignore_leading_byte_order_mark() {
diff --git a/tests/changelog.rs b/tests/changelog.rs
index 85535353..73fc0ff9 100644
--- a/tests/changelog.rs
+++ b/tests/changelog.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn print_changelog() {
diff --git a/tests/choose.rs b/tests/choose.rs
index 8f094ffc..6444f2a7 100644
--- a/tests/choose.rs
+++ b/tests/choose.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name: env,
diff --git a/tests/command.rs b/tests/command.rs
index 4da4393c..47cd0390 100644
--- a/tests/command.rs
+++ b/tests/command.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name: long,
diff --git a/tests/common.rs b/tests/common.rs
deleted file mode 100644
index 1915197c..00000000
--- a/tests/common.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-pub(crate) use std::{
-  collections::BTreeMap,
-  env::{self, consts::EXE_SUFFIX},
-  error::Error,
-  fmt::Debug,
-  fs,
-  io::Write,
-  iter,
-  path::{Path, PathBuf, MAIN_SEPARATOR},
-  process::{Command, Output, Stdio},
-  str,
-};
-
-pub(crate) use ::{
-  cradle::input::Input,
-  executable_path::executable_path,
-  just::unindent,
-  libc::{EXIT_FAILURE, EXIT_SUCCESS},
-  pretty_assertions::Comparison,
-  regex::Regex,
-  serde_json::{json, Value},
-  tempfile::TempDir,
-  temptree::{temptree, tree, Tree},
-  which::which,
-  yaml_rust::YamlLoader,
-};
-
-pub(crate) use crate::{
-  assert_stdout::assert_stdout, assert_success::assert_success, tempdir::tempdir, test::Test,
-};
diff --git a/tests/completions.rs b/tests/completions.rs
index 79132382..2f33d2a8 100644
--- a/tests/completions.rs
+++ b/tests/completions.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn output() {
diff --git a/tests/conditional.rs b/tests/conditional.rs
index a9bec9ff..3784a036 100644
--- a/tests/conditional.rs
+++ b/tests/conditional.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name: then_branch_unevaluated,
diff --git a/tests/delimiters.rs b/tests/delimiters.rs
index 638ca5e5..ab032e6a 100644
--- a/tests/delimiters.rs
+++ b/tests/delimiters.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name: mismatched_delimiter,
diff --git a/tests/dotenv.rs b/tests/dotenv.rs
index e0685323..257a2d6a 100644
--- a/tests/dotenv.rs
+++ b/tests/dotenv.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn dotenv() {
diff --git a/tests/edit.rs b/tests/edit.rs
index e1199a5c..c7d72c78 100644
--- a/tests/edit.rs
+++ b/tests/edit.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 const JUSTFILE: &str = "Yooooooo, hopefully this never becomes valid syntax.";
 
diff --git a/tests/equals.rs b/tests/equals.rs
index 476cea6b..7c781f2f 100644
--- a/tests/equals.rs
+++ b/tests/equals.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn export_recipe() {
diff --git a/tests/error_messages.rs b/tests/error_messages.rs
index 108d3769..54b93d03 100644
--- a/tests/error_messages.rs
+++ b/tests/error_messages.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name: expected_keyword,
diff --git a/tests/evaluate.rs b/tests/evaluate.rs
index 412314b1..22fa746c 100644
--- a/tests/evaluate.rs
+++ b/tests/evaluate.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name:     evaluate,
diff --git a/tests/examples.rs b/tests/examples.rs
index 9d3e2720..dd7eee9b 100644
--- a/tests/examples.rs
+++ b/tests/examples.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn examples() {
diff --git a/tests/fall_back_to_parent.rs b/tests/fall_back_to_parent.rs
index 74351a1c..af6ee4f0 100644
--- a/tests/fall_back_to_parent.rs
+++ b/tests/fall_back_to_parent.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn runs_recipe_in_parent_if_not_found_in_current() {
diff --git a/tests/fmt.rs b/tests/fmt.rs
index 9da74ed9..e4c46874 100644
--- a/tests/fmt.rs
+++ b/tests/fmt.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name: unstable_not_passed,
diff --git a/tests/functions.rs b/tests/functions.rs
index e5f8d351..327abe7f 100644
--- a/tests/functions.rs
+++ b/tests/functions.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name:     test_os_arch_functions_in_interpolation,
diff --git a/tests/init.rs b/tests/init.rs
index 27888864..955f51da 100644
--- a/tests/init.rs
+++ b/tests/init.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 const EXPECTED: &str = "default:\n    echo 'Hello, world!'\n";
 
diff --git a/tests/interrupts.rs b/tests/interrupts.rs
index 9842d86e..44b2d71a 100644
--- a/tests/interrupts.rs
+++ b/tests/interrupts.rs
@@ -1,90 +1,87 @@
-#[cfg(unix)]
-mod unix {
-  use crate::common::*;
+use super::*;
 
-  use std::time::{Duration, Instant};
+use std::time::{Duration, Instant};
 
-  fn kill(process_id: u32) {
-    unsafe {
-      libc::kill(process_id as i32, libc::SIGINT);
-    }
+fn kill(process_id: u32) {
+  unsafe {
+    libc::kill(process_id as i32, libc::SIGINT);
   }
+}
 
-  fn interrupt_test(arguments: &[&str], justfile: &str) {
-    let tmp = tempdir();
-    let mut justfile_path = tmp.path().to_path_buf();
-    justfile_path.push("justfile");
-    fs::write(justfile_path, unindent(justfile)).unwrap();
-
-    let start = Instant::now();
+fn interrupt_test(arguments: &[&str], justfile: &str) {
+  let tmp = tempdir();
+  let mut justfile_path = tmp.path().to_path_buf();
+  justfile_path.push("justfile");
+  fs::write(justfile_path, unindent(justfile)).unwrap();
 
-    let mut child = Command::new(&executable_path("just"))
-      .current_dir(&tmp)
-      .args(arguments)
-      .spawn()
-      .expect("just invocation failed");
+  let start = Instant::now();
 
-    while start.elapsed() < Duration::from_millis(500) {}
+  let mut child = Command::new(&executable_path("just"))
+    .current_dir(&tmp)
+    .args(arguments)
+    .spawn()
+    .expect("just invocation failed");
 
-    kill(child.id());
+  while start.elapsed() < Duration::from_millis(500) {}
 
-    let status = child.wait().unwrap();
+  kill(child.id());
 
-    let elapsed = start.elapsed();
+  let status = child.wait().unwrap();
 
-    if elapsed > Duration::from_secs(2) {
-      panic!("process returned too late: {:?}", elapsed);
-    }
+  let elapsed = start.elapsed();
 
-    if elapsed < Duration::from_millis(100) {
-      panic!("process returned too early : {:?}", elapsed);
-    }
+  if elapsed > Duration::from_secs(2) {
+    panic!("process returned too late: {:?}", elapsed);
+  }
 
-    assert_eq!(status.code(), Some(130));
+  if elapsed < Duration::from_millis(100) {
+    panic!("process returned too early : {:?}", elapsed);
   }
 
-  #[test]
-  #[ignore]
-  fn interrupt_shebang() {
-    interrupt_test(
-      &[],
-      "
+  assert_eq!(status.code(), Some(130));
+}
+
+#[test]
+#[ignore]
+fn interrupt_shebang() {
+  interrupt_test(
+    &[],
+    "
         default:
           #!/usr/bin/env sh
           sleep 1
       ",
-    );
-  }
+  );
+}
 
-  #[test]
-  #[ignore]
-  fn interrupt_line() {
-    interrupt_test(
-      &[],
-      "
+#[test]
+#[ignore]
+fn interrupt_line() {
+  interrupt_test(
+    &[],
+    "
         default:
           @sleep 1
       ",
-    );
-  }
+  );
+}
 
-  #[test]
-  #[ignore]
-  fn interrupt_backtick() {
-    interrupt_test(
-      &[],
-      "
+#[test]
+#[ignore]
+fn interrupt_backtick() {
+  interrupt_test(
+    &[],
+    "
         foo := `sleep 1`
 
         default:
           @echo {{foo}}
       ",
-    );
-  }
+  );
+}
 
-  #[test]
-  #[ignore]
-  fn interrupt_command() {
-    interrupt_test(&["--command", "sleep", "1"], "");
-  }
+#[test]
+#[ignore]
+fn interrupt_command() {
+  interrupt_test(&["--command", "sleep", "1"], "");
 }
diff --git a/tests/invocation_directory.rs b/tests/invocation_directory.rs
index 1215bc27..b45e05e1 100644
--- a/tests/invocation_directory.rs
+++ b/tests/invocation_directory.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[cfg(unix)]
 fn convert_native_path(path: &Path) -> String {
diff --git a/tests/json.rs b/tests/json.rs
index 308b1ccd..e312111d 100644
--- a/tests/json.rs
+++ b/tests/json.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 fn test(justfile: &str, value: Value) {
   Test::new()
diff --git a/tests/lib.rs b/tests/lib.rs
index 4f2f4248..f5076798 100644
--- a/tests/lib.rs
+++ b/tests/lib.rs
@@ -1,3 +1,32 @@
+pub(crate) use {
+  crate::{
+    assert_stdout::assert_stdout, assert_success::assert_success, tempdir::tempdir, test::Test,
+  },
+  cradle::input::Input,
+  executable_path::executable_path,
+  just::unindent,
+  libc::{EXIT_FAILURE, EXIT_SUCCESS},
+  pretty_assertions::Comparison,
+  regex::Regex,
+  serde_json::{json, Value},
+  std::{
+    collections::BTreeMap,
+    env::{self, consts::EXE_SUFFIX},
+    error::Error,
+    fmt::Debug,
+    fs,
+    io::Write,
+    iter,
+    path::{Path, PathBuf, MAIN_SEPARATOR},
+    process::{Command, Output, Stdio},
+    str,
+  },
+  tempfile::TempDir,
+  temptree::{temptree, tree, Tree},
+  which::which,
+  yaml_rust::YamlLoader,
+};
+
 #[macro_use]
 mod test;
 
@@ -8,7 +37,6 @@ mod byte_order_mark;
 mod changelog;
 mod choose;
 mod command;
-mod common;
 mod completions;
 mod conditional;
 mod delimiters;
@@ -23,6 +51,7 @@ mod fall_back_to_parent;
 mod fmt;
 mod functions;
 mod init;
+#[cfg(unix)]
 mod interrupts;
 mod invocation_directory;
 mod json;
diff --git a/tests/line_prefixes.rs b/tests/line_prefixes.rs
index c1fd510b..f98d6c50 100644
--- a/tests/line_prefixes.rs
+++ b/tests/line_prefixes.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn infallible_after_quiet() {
diff --git a/tests/misc.rs b/tests/misc.rs
index cdf14e99..1c5ef204 100644
--- a/tests/misc.rs
+++ b/tests/misc.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name: alias_listing,
diff --git a/tests/quiet.rs b/tests/quiet.rs
index 3a2a7666..d906d9e4 100644
--- a/tests/quiet.rs
+++ b/tests/quiet.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name:     no_stdout,
diff --git a/tests/quote.rs b/tests/quote.rs
index 4cbdc94f..bc6afc40 100644
--- a/tests/quote.rs
+++ b/tests/quote.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn single_quotes_are_prepended_and_appended() {
diff --git a/tests/readme.rs b/tests/readme.rs
index dacb8f4e..2c320142 100644
--- a/tests/readme.rs
+++ b/tests/readme.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn readme() {
diff --git a/tests/regexes.rs b/tests/regexes.rs
index c39045e4..7a53a0af 100644
--- a/tests/regexes.rs
+++ b/tests/regexes.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn match_succeeds_evaluates_to_first_branch() {
diff --git a/tests/run.rs b/tests/run.rs
index 2d7d7d32..bad51f8a 100644
--- a/tests/run.rs
+++ b/tests/run.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn dont_run_duplicate_recipes() {
diff --git a/tests/search.rs b/tests/search.rs
index 425ba8d1..395f3a9e 100644
--- a/tests/search.rs
+++ b/tests/search.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 fn search_test<P: AsRef<Path>>(path: P, args: &[&str]) {
   let binary = executable_path("just");
diff --git a/tests/shell.rs b/tests/shell.rs
index fb2e00e2..30396e40 100644
--- a/tests/shell.rs
+++ b/tests/shell.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 const JUSTFILE: &str = "
 expression := `EXPRESSION`
diff --git a/tests/show.rs b/tests/show.rs
index 309e53a6..91384898 100644
--- a/tests/show.rs
+++ b/tests/show.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name:     show,
diff --git a/tests/string.rs b/tests/string.rs
index d1ad12bb..a7e08942 100644
--- a/tests/string.rs
+++ b/tests/string.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name:     raw_string,
diff --git a/tests/sublime_syntax.rs b/tests/sublime_syntax.rs
index fb2a7dec..040b4342 100644
--- a/tests/sublime_syntax.rs
+++ b/tests/sublime_syntax.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn parse() {
diff --git a/tests/subsequents.rs b/tests/subsequents.rs
index 36230b99..10fa25a0 100644
--- a/tests/subsequents.rs
+++ b/tests/subsequents.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 test! {
   name: success,
diff --git a/tests/test.rs b/tests/test.rs
index a126fb58..a8909309 100644
--- a/tests/test.rs
+++ b/tests/test.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 use pretty_assertions::assert_eq;
 
diff --git a/tests/undefined_variables.rs b/tests/undefined_variables.rs
index 00262533..be982aaf 100644
--- a/tests/undefined_variables.rs
+++ b/tests/undefined_variables.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn parameter_default_unknown_variable_in_expression() {
diff --git a/tests/windows_powershell.rs b/tests/windows_powershell.rs
index 79ea0b30..1a450bd3 100644
--- a/tests/windows_powershell.rs
+++ b/tests/windows_powershell.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn windows_poweshell_setting_uses_powershell() {
diff --git a/tests/windows_shell.rs b/tests/windows_shell.rs
index db0a93a2..7db69882 100644
--- a/tests/windows_shell.rs
+++ b/tests/windows_shell.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 #[test]
 fn windows_shell_setting() {
diff --git a/tests/working_directory.rs b/tests/working_directory.rs
index c43252e5..28e5ffd5 100644
--- a/tests/working_directory.rs
+++ b/tests/working_directory.rs
@@ -1,4 +1,4 @@
-use crate::common::*;
+use super::*;
 
 const JUSTFILE: &str = r#"
 foo := `cat data`