mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 01:31:55 +08:00
Remove using statements already imported by preludes
This commit is contained in:
parent
b77d1d0e2b
commit
50ff6b8a34
@ -2,8 +2,6 @@ use super::prelude::*;
|
||||
use crate::abbrs::{self, Abbreviation, Position};
|
||||
use crate::common::{escape, escape_string, valid_func_name, EscapeStringStyle};
|
||||
use crate::env::{EnvMode, EnvStackSetResult};
|
||||
use crate::io::IoStreams;
|
||||
use crate::parser::Parser;
|
||||
use crate::re::{regex_make_anchored, to_boxed_chars};
|
||||
use pcre2::utf32::{Regex, RegexBuilder};
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
use super::prelude::*;
|
||||
use crate::builtins::shared::{builtin_exists, builtin_get_names};
|
||||
|
||||
#[derive(Default)]
|
||||
struct builtin_cmd_opts_t {
|
||||
|
@ -7,7 +7,7 @@ use crate::{
|
||||
path::path_apply_cdpath,
|
||||
wutil::{normalize_path, wperror, wreadlink},
|
||||
};
|
||||
use errno::{self, Errno};
|
||||
use errno::Errno;
|
||||
use libc::{fchdir, EACCES, ELOOP, ENOENT, ENOTDIR, EPERM};
|
||||
use nix::{fcntl::OFlag, sys::stat::Mode};
|
||||
use std::{os::fd::AsRawFd, sync::Arc};
|
||||
|
@ -18,7 +18,6 @@ use crate::tokenizer::TOK_ACCEPT_UNFINISHED;
|
||||
use crate::tokenizer::{TokenType, Tokenizer};
|
||||
use crate::wchar::prelude::*;
|
||||
use crate::wcstringutil::join_strings;
|
||||
use crate::wgetopt::{wgetopter_t, wopt, woption, woption_argument_t};
|
||||
use std::ops::Range;
|
||||
|
||||
/// Which part of the comandbuffer are we operating on.
|
||||
|
@ -10,7 +10,7 @@ use crate::{
|
||||
wutil::{fish_wcstoi, wgettext_fmt},
|
||||
};
|
||||
use libc::c_int;
|
||||
use libc::{self, SIGCONT};
|
||||
use libc::SIGCONT;
|
||||
|
||||
/// Helper for builtin_disown.
|
||||
fn disown_job(cmd: &wstr, streams: &mut IoStreams, j: &Job) {
|
||||
|
@ -6,10 +6,8 @@ use crate::env::environment::Environment;
|
||||
use crate::event::{self, EventDescription, EventHandler};
|
||||
use crate::function;
|
||||
use crate::global_safety::RelaxedAtomicBool;
|
||||
use crate::io::IoStreams;
|
||||
use crate::nix::getpid;
|
||||
use crate::parse_tree::NodeRef;
|
||||
use crate::parser::Parser;
|
||||
use crate::parser_keywords::parser_keywords_is_reserved;
|
||||
use crate::signal::Signal;
|
||||
use std::sync::Arc;
|
||||
|
@ -8,7 +8,6 @@ use crate::event::{self};
|
||||
use crate::function;
|
||||
use crate::highlight::colorize;
|
||||
use crate::highlight::highlight_shell;
|
||||
use crate::parser::Parser;
|
||||
use crate::parser_keywords::parser_keywords_is_reserved;
|
||||
use crate::termsize::termsize_last;
|
||||
|
||||
|
@ -18,7 +18,6 @@ use crate::{
|
||||
wutil::{fish_wcstoi, wgettext_fmt},
|
||||
};
|
||||
use libc::c_int;
|
||||
use libc::{self};
|
||||
use printf_compat::sprintf;
|
||||
use std::num::NonZeroU32;
|
||||
use std::sync::atomic::Ordering;
|
||||
|
@ -16,8 +16,6 @@ use crate::wutil::{
|
||||
use bitflags::bitflags;
|
||||
use libc::{mode_t, F_OK, PATH_MAX, R_OK, S_ISGID, S_ISUID, W_OK, X_OK};
|
||||
|
||||
use super::shared::BuiltinCmd;
|
||||
|
||||
macro_rules! path_error {
|
||||
(
|
||||
$streams:expr,
|
||||
|
@ -4,7 +4,6 @@ use errno::errno;
|
||||
|
||||
use super::prelude::*;
|
||||
use crate::env::Environment;
|
||||
use crate::io::IoStreams;
|
||||
use crate::{
|
||||
path::path_apply_working_directory,
|
||||
wutil::{normalize_path, wrealpath},
|
||||
|
@ -15,7 +15,6 @@ use crate::expand::expand_escape_string;
|
||||
use crate::expand::expand_escape_variable;
|
||||
use crate::history::history_session_id;
|
||||
use crate::history::History;
|
||||
use crate::wchar_ext::WExt;
|
||||
use crate::{
|
||||
env::{EnvMode, EnvVar, Environment},
|
||||
wutil::wcstoi::wcstoi_partial,
|
||||
|
@ -7,12 +7,10 @@ use crate::parse_util::parse_util_argument_is_help;
|
||||
use crate::parser::{Block, BlockType, LoopStatus};
|
||||
use crate::proc::{no_exec, ProcStatus};
|
||||
use crate::reader::reader_read;
|
||||
use crate::wchar::{wstr, WString, L};
|
||||
use crate::wgetopt::{wgetopter_t, wopt, woption, woption_argument_t};
|
||||
use crate::wchar::L;
|
||||
use errno::errno;
|
||||
use libc::{c_int, STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO};
|
||||
use libc::{STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO};
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::fs::File;
|
||||
use std::io::{BufRead, BufReader, Read};
|
||||
use std::os::fd::FromRawFd;
|
||||
|
@ -7,7 +7,7 @@ use crate::{
|
||||
parser::Block,
|
||||
reader::reader_read,
|
||||
};
|
||||
use libc::{c_int, S_IFMT, S_IFREG};
|
||||
use libc::{S_IFMT, S_IFREG};
|
||||
use nix::{fcntl::OFlag, sys::stat::Mode};
|
||||
|
||||
use super::prelude::*;
|
||||
|
@ -1,8 +1,5 @@
|
||||
use std::borrow::Cow;
|
||||
|
||||
use super::*;
|
||||
use crate::fallback::fish_wcwidth;
|
||||
use crate::wutil::fish_wcstol;
|
||||
|
||||
pub struct Pad {
|
||||
char_to_pad: char,
|
||||
|
@ -1,5 +1,4 @@
|
||||
use super::*;
|
||||
use crate::wutil::fish_wcstol;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Repeat {
|
||||
|
@ -1,5 +1,4 @@
|
||||
use pcre2::utf32::{Regex, RegexBuilder};
|
||||
use std::borrow::Cow;
|
||||
|
||||
use super::*;
|
||||
use crate::future_feature_flags::{feature_test, FeatureFlag};
|
||||
|
@ -1,7 +1,6 @@
|
||||
use super::*;
|
||||
use crate::common::get_ellipsis_str;
|
||||
use crate::wcstringutil::split_string;
|
||||
use crate::wutil::fish_wcstol;
|
||||
|
||||
pub struct Shorten<'args> {
|
||||
ellipsis: &'args wstr,
|
||||
|
@ -2,7 +2,6 @@ use std::ops::Deref;
|
||||
|
||||
use super::*;
|
||||
use crate::wcstringutil::split_about;
|
||||
use crate::wutil::{fish_wcstoi, fish_wcstol};
|
||||
|
||||
pub struct Split<'args> {
|
||||
quiet: bool,
|
||||
|
@ -1,7 +1,6 @@
|
||||
use std::num::NonZeroI64;
|
||||
|
||||
use super::*;
|
||||
use crate::wutil::fish_wcstol;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Sub {
|
||||
|
@ -1,5 +1,4 @@
|
||||
use super::prelude::*;
|
||||
use crate::builtins::shared::builtin_exists;
|
||||
use crate::common::str2wcstring;
|
||||
use crate::function;
|
||||
use crate::highlight::{colorize, highlight_shell};
|
||||
|
@ -12,7 +12,6 @@ use crate::flog::{FLOG, FLOGF};
|
||||
use crate::path::path_get_config;
|
||||
use crate::path::{path_get_config_remoteness, DirRemoteness};
|
||||
use crate::wchar::prelude::*;
|
||||
use crate::wchar::{wstr, WString};
|
||||
use crate::wcstringutil::{join_strings, split_string, string_suffixes_string, LineIterator};
|
||||
use crate::wutil::{
|
||||
file_id_for_fd, file_id_for_path, file_id_for_path_narrow, wdirname, wrealpath, wrename, wstat,
|
||||
|
@ -10,7 +10,7 @@ use crate::flog::FLOG;
|
||||
use crate::threads::assert_is_background_thread;
|
||||
use crate::wutil::perror;
|
||||
use errno::errno;
|
||||
use libc::{self, c_void, EAGAIN, EINTR, EWOULDBLOCK};
|
||||
use libc::{c_void, EAGAIN, EINTR, EWOULDBLOCK};
|
||||
|
||||
#[cfg(not(HAVE_EVENTFD))]
|
||||
use crate::fds::{make_autoclose_pipes, make_fd_nonblocking};
|
||||
|
@ -5,8 +5,8 @@ use crate::proc::Job;
|
||||
use crate::redirection::Dup2List;
|
||||
use crate::signal::get_signals_with_handlers;
|
||||
use crate::{exec::is_thompson_shell_script, libc::_PATH_BSHELL};
|
||||
use errno::{self, Errno};
|
||||
use libc::{self, c_char, posix_spawn_file_actions_t, posix_spawnattr_t};
|
||||
use errno::Errno;
|
||||
use libc::{c_char, posix_spawn_file_actions_t, posix_spawnattr_t};
|
||||
use std::ffi::{CStr, CString};
|
||||
use std::sync::atomic::Ordering;
|
||||
|
||||
|
@ -13,7 +13,7 @@ use crate::parse_tree::NodeRef;
|
||||
use crate::parser::Parser;
|
||||
use crate::parser_keywords::parser_keywords_is_reserved;
|
||||
use crate::wchar::prelude::*;
|
||||
use crate::wutil::{dir_iter::DirIter, gettext::wgettext_str, sprintf};
|
||||
use crate::wutil::{dir_iter::DirIter, sprintf};
|
||||
use once_cell::sync::Lazy;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
@ -59,7 +59,6 @@ use crate::{
|
||||
threads::{assert_is_background_thread, iothread_perform},
|
||||
util::find_subslice,
|
||||
wchar::prelude::*,
|
||||
wchar_ext::WExt,
|
||||
wcstringutil::subsequence_in_string,
|
||||
wildcard::{wildcard_match, ANY_STRING},
|
||||
wutil::{
|
||||
|
@ -447,10 +447,8 @@ mod expander {
|
||||
|
||||
use crate::{
|
||||
common::scoped_push,
|
||||
complete::CompleteFlags,
|
||||
path::append_path_component,
|
||||
wcstringutil::string_fuzzy_match_string,
|
||||
wutil::{dir_iter::DirIter, normalize_path, waccess, FileId},
|
||||
wutil::{dir_iter::DirIter, normalize_path, FileId},
|
||||
};
|
||||
|
||||
use super::*;
|
||||
|
@ -3,7 +3,6 @@ use crate::wchar::prelude::*;
|
||||
use num_traits::{NumCast, PrimInt};
|
||||
use std::default::Default;
|
||||
use std::iter::{Fuse, Peekable};
|
||||
use std::result::Result;
|
||||
|
||||
struct ParseResult {
|
||||
result: u64,
|
||||
|
Loading…
x
Reference in New Issue
Block a user