Merge imports (#1462)
This commit is contained in:
parent
e7721d0a84
commit
157862d398
@ -1,5 +1,4 @@
|
|||||||
use regex::Regex;
|
use {regex::Regex, structopt::StructOpt};
|
||||||
use structopt::StructOpt;
|
|
||||||
|
|
||||||
#[derive(StructOpt)]
|
#[derive(StructOpt)]
|
||||||
struct Arguments {
|
struct Arguments {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
use executable_path::executable_path;
|
use {
|
||||||
use std::{process::Command, str};
|
executable_path::executable_path,
|
||||||
|
std::{process::Command, str},
|
||||||
|
};
|
||||||
|
|
||||||
fn stdout(reference: &str) -> String {
|
fn stdout(reference: &str) -> String {
|
||||||
let output = Command::new(executable_path("ref-type"))
|
let output = Command::new(executable_path("ref-type"))
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
use super::*;
|
use {super::*, CompileErrorKind::*};
|
||||||
|
|
||||||
use CompileErrorKind::*;
|
|
||||||
|
|
||||||
const VALID_ALIAS_ATTRIBUTES: [Attribute; 1] = [Attribute::Private];
|
const VALID_ALIAS_ATTRIBUTES: [Attribute; 1] = [Attribute::Private];
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
use super::*;
|
use {super::*, CompileErrorKind::*};
|
||||||
|
|
||||||
use CompileErrorKind::*;
|
|
||||||
|
|
||||||
pub(crate) struct AssignmentResolver<'src: 'run, 'run> {
|
pub(crate) struct AssignmentResolver<'src: 'run, 'run> {
|
||||||
assignments: &'run Table<'src, Assignment<'src>>,
|
assignments: &'run Table<'src, Assignment<'src>>,
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
use super::*;
|
use {
|
||||||
|
super::*,
|
||||||
use ansi_term::{ANSIGenericString, Color::*, Prefix, Style, Suffix};
|
ansi_term::{ANSIGenericString, Color::*, Prefix, Style, Suffix},
|
||||||
use atty::Stream;
|
atty::Stream,
|
||||||
|
};
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||||
pub(crate) struct Color {
|
pub(crate) struct Color {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use super::*;
|
use {
|
||||||
|
super::*,
|
||||||
use clap::{App, AppSettings, Arg, ArgGroup, ArgMatches, ArgSettings};
|
clap::{App, AppSettings, Arg, ArgGroup, ArgMatches, ArgSettings},
|
||||||
|
};
|
||||||
|
|
||||||
// These three strings should be kept in sync:
|
// These three strings should be kept in sync:
|
||||||
pub(crate) const CHOOSER_DEFAULT: &str = "fzf";
|
pub(crate) const CHOOSER_DEFAULT: &str = "fzf";
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
#![allow(unknown_lints)]
|
#![allow(unknown_lints)]
|
||||||
#![allow(clippy::unnecessary_wraps)]
|
#![allow(clippy::unnecessary_wraps)]
|
||||||
|
|
||||||
use super::*;
|
use {
|
||||||
|
super::*,
|
||||||
use heck::{
|
heck::{
|
||||||
ToKebabCase, ToLowerCamelCase, ToShoutyKebabCase, ToShoutySnakeCase, ToSnakeCase, ToTitleCase,
|
ToKebabCase, ToLowerCamelCase, ToShoutyKebabCase, ToShoutySnakeCase, ToSnakeCase, ToTitleCase,
|
||||||
ToUpperCamelCase,
|
ToUpperCamelCase,
|
||||||
|
},
|
||||||
|
Function::*,
|
||||||
};
|
};
|
||||||
|
|
||||||
use Function::*;
|
|
||||||
|
|
||||||
pub(crate) enum Function {
|
pub(crate) enum Function {
|
||||||
Nullary(fn(&FunctionContext) -> Result<String, String>),
|
Nullary(fn(&FunctionContext) -> Result<String, String>),
|
||||||
Unary(fn(&FunctionContext, &str) -> Result<String, String>),
|
Unary(fn(&FunctionContext, &str) -> Result<String, String>),
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
use super::*;
|
use {super::*, serde::Serialize};
|
||||||
|
|
||||||
use serde::Serialize;
|
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Serialize)]
|
#[derive(Debug, PartialEq, Serialize)]
|
||||||
pub(crate) struct Justfile<'src> {
|
pub(crate) struct Justfile<'src> {
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
use super::*;
|
use {super::*, CompileErrorKind::*, TokenKind::*};
|
||||||
|
|
||||||
use CompileErrorKind::*;
|
|
||||||
use TokenKind::*;
|
|
||||||
|
|
||||||
/// Just language lexer
|
/// Just language lexer
|
||||||
///
|
///
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
use super::*;
|
use {super::*, TokenKind::*};
|
||||||
|
|
||||||
use TokenKind::*;
|
|
||||||
|
|
||||||
/// Just language parser
|
/// Just language parser
|
||||||
///
|
///
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use super::*;
|
use {
|
||||||
|
super::*,
|
||||||
use std::process::{ExitStatus, Stdio};
|
std::process::{ExitStatus, Stdio},
|
||||||
|
};
|
||||||
|
|
||||||
/// Return a `Error::Signal` if the process was terminated by a signal,
|
/// Return a `Error::Signal` if the process was terminated by a signal,
|
||||||
/// otherwise return an `Error::UnknownFailure`
|
/// otherwise return an `Error::UnknownFailure`
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
use super::*;
|
use {super::*, CompileErrorKind::*};
|
||||||
|
|
||||||
use CompileErrorKind::*;
|
|
||||||
|
|
||||||
pub(crate) struct RecipeResolver<'src: 'run, 'run> {
|
pub(crate) struct RecipeResolver<'src: 'run, 'run> {
|
||||||
unresolved_recipes: Table<'src, UnresolvedRecipe<'src>>,
|
unresolved_recipes: Table<'src, UnresolvedRecipe<'src>>,
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
use super::*;
|
use {super::*, std::path::Component};
|
||||||
|
|
||||||
use std::path::Component;
|
|
||||||
|
|
||||||
const DEFAULT_JUSTFILE_NAME: &str = JUSTFILE_NAMES[0];
|
const DEFAULT_JUSTFILE_NAME: &str = JUSTFILE_NAMES[0];
|
||||||
const JUSTFILE_NAMES: &[&str] = &["justfile", ".justfile"];
|
const JUSTFILE_NAMES: &[&str] = &["justfile", ".justfile"];
|
||||||
|
@ -12,9 +12,10 @@
|
|||||||
//! that changes to just do not inadvertently break or change the interpretation
|
//! that changes to just do not inadvertently break or change the interpretation
|
||||||
//! of existing justfiles.
|
//! 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 {
|
mod full {
|
||||||
pub(crate) use crate::{
|
pub(crate) use crate::{
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
use super::*;
|
use {super::*, std::collections::btree_map};
|
||||||
|
|
||||||
use std::collections::btree_map;
|
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Serialize)]
|
#[derive(Debug, PartialEq, Serialize)]
|
||||||
#[serde(transparent)]
|
#[serde(transparent)]
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
use super::*;
|
use {super::*, crate::compiler::Compiler, pretty_assertions::assert_eq};
|
||||||
|
|
||||||
use crate::compiler::Compiler;
|
|
||||||
use pretty_assertions::assert_eq;
|
|
||||||
|
|
||||||
pub(crate) fn compile(text: &str) -> Justfile {
|
pub(crate) fn compile(text: &str) -> Justfile {
|
||||||
match Compiler::compile(text) {
|
match Compiler::compile(text) {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use super::*;
|
use {
|
||||||
|
super::*,
|
||||||
use std::{borrow::Cow, mem};
|
std::{borrow::Cow, mem},
|
||||||
|
};
|
||||||
|
|
||||||
/// Construct a `Tree` from a symbolic expression literal. This macro, and the
|
/// 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
|
/// Tree type, are only used in the Parser unit tests, providing a concise
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
use super::*;
|
use {
|
||||||
|
super::*,
|
||||||
use std::time::{Duration, Instant};
|
std::time::{Duration, Instant},
|
||||||
|
};
|
||||||
|
|
||||||
fn kill(process_id: u32) {
|
fn kill(process_id: u32) {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
use super::*;
|
use {super::*, pretty_assertions::assert_eq};
|
||||||
|
|
||||||
use pretty_assertions::assert_eq;
|
|
||||||
|
|
||||||
macro_rules! test {
|
macro_rules! test {
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user