1
0
mirror of https://github.com/sharkdp/fd synced 2024-07-03 00:08:39 +00:00

Remove lazy_static from dependencies

This commit is contained in:
Shun Sakai 2021-11-25 22:34:54 +09:00 committed by David Peter
parent f32060b0de
commit 0484486f3f
4 changed files with 6 additions and 10 deletions

1
Cargo.lock generated
View File

@ -172,7 +172,6 @@ dependencies = [
"humantime",
"ignore",
"jemallocator",
"lazy_static",
"libc",
"lscolors",
"nix",

View File

@ -37,7 +37,6 @@ version_check = "0.9"
ansi_term = "0.12"
atty = "0.2"
ignore = "0.4.3"
lazy_static = "1.1.0"
num_cpus = "1.8"
regex = "1.5.4"
regex-syntax = "0.6"

View File

@ -10,7 +10,7 @@ use std::process::{Command, Stdio};
use std::sync::{Arc, Mutex};
use anyhow::{anyhow, Result};
use lazy_static::lazy_static;
use once_cell::sync::Lazy;
use regex::Regex;
use crate::exit_codes::ExitCode;
@ -72,9 +72,8 @@ impl CommandTemplate {
I: IntoIterator<Item = S>,
S: AsRef<str>,
{
lazy_static! {
static ref PLACEHOLDER_PATTERN: Regex = Regex::new(r"\{(/?\.?|//)\}").unwrap();
}
static PLACEHOLDER_PATTERN: Lazy<Regex> =
Lazy::new(|| Regex::new(r"\{(/?\.?|//)\}").unwrap());
let mut args = Vec::new();
let mut has_placeholder = false;

View File

@ -1,9 +1,8 @@
use lazy_static::lazy_static;
use once_cell::sync::Lazy;
use regex::Regex;
lazy_static! {
static ref SIZE_CAPTURES: Regex = Regex::new(r"(?i)^([+-]?)(\d+)(b|[kmgt]i?b?)$").unwrap();
}
static SIZE_CAPTURES: Lazy<Regex> =
Lazy::new(|| Regex::new(r"(?i)^([+-]?)(\d+)(b|[kmgt]i?b?)$").unwrap());
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum SizeFilter {