Merge imports (#1462)
This commit is contained in:
parent
e7721d0a84
commit
157862d398
@ -1,5 +1,4 @@
|
||||
use regex::Regex;
|
||||
use structopt::StructOpt;
|
||||
use {regex::Regex, structopt::StructOpt};
|
||||
|
||||
#[derive(StructOpt)]
|
||||
struct Arguments {
|
||||
|
@ -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"))
|
||||
|
@ -1,6 +1,4 @@
|
||||
use super::*;
|
||||
|
||||
use CompileErrorKind::*;
|
||||
use {super::*, CompileErrorKind::*};
|
||||
|
||||
const VALID_ALIAS_ATTRIBUTES: [Attribute; 1] = [Attribute::Private];
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
use super::*;
|
||||
|
||||
use CompileErrorKind::*;
|
||||
use {super::*, CompileErrorKind::*};
|
||||
|
||||
pub(crate) struct AssignmentResolver<'src: 'run, 'run> {
|
||||
assignments: &'run Table<'src, Assignment<'src>>,
|
||||
|
@ -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 {
|
||||
|
@ -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";
|
||||
|
@ -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<String, String>),
|
||||
Unary(fn(&FunctionContext, &str) -> Result<String, String>),
|
||||
|
@ -1,6 +1,4 @@
|
||||
use super::*;
|
||||
|
||||
use serde::Serialize;
|
||||
use {super::*, serde::Serialize};
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize)]
|
||||
pub(crate) struct Justfile<'src> {
|
||||
|
@ -1,7 +1,4 @@
|
||||
use super::*;
|
||||
|
||||
use CompileErrorKind::*;
|
||||
use TokenKind::*;
|
||||
use {super::*, CompileErrorKind::*, TokenKind::*};
|
||||
|
||||
/// Just language lexer
|
||||
///
|
||||
|
@ -1,6 +1,4 @@
|
||||
use super::*;
|
||||
|
||||
use TokenKind::*;
|
||||
use {super::*, TokenKind::*};
|
||||
|
||||
/// Just language parser
|
||||
///
|
||||
|
@ -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`
|
||||
|
@ -1,6 +1,4 @@
|
||||
use super::*;
|
||||
|
||||
use CompileErrorKind::*;
|
||||
use {super::*, CompileErrorKind::*};
|
||||
|
||||
pub(crate) struct RecipeResolver<'src: 'run, 'run> {
|
||||
unresolved_recipes: Table<'src, UnresolvedRecipe<'src>>,
|
||||
|
@ -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"];
|
||||
|
@ -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::{
|
||||
|
@ -1,6 +1,4 @@
|
||||
use super::*;
|
||||
|
||||
use std::collections::btree_map;
|
||||
use {super::*, std::collections::btree_map};
|
||||
|
||||
#[derive(Debug, PartialEq, Serialize)]
|
||||
#[serde(transparent)]
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
@ -1,6 +1,7 @@
|
||||
use super::*;
|
||||
|
||||
use std::time::{Duration, Instant};
|
||||
use {
|
||||
super::*,
|
||||
std::time::{Duration, Instant},
|
||||
};
|
||||
|
||||
fn kill(process_id: u32) {
|
||||
unsafe {
|
||||
|
@ -1,6 +1,4 @@
|
||||
use super::*;
|
||||
|
||||
use pretty_assertions::assert_eq;
|
||||
use {super::*, pretty_assertions::assert_eq};
|
||||
|
||||
macro_rules! test {
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user