mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-06-14 22:15:13 +02:00
edition: initial 'cargo fix --edition' run
This commit is contained in:
@ -3,13 +3,13 @@ use regex::bytes::{Regex, RegexBuilder};
|
||||
use regex_syntax::ast::{self, Ast};
|
||||
use regex_syntax::hir::{self, Hir};
|
||||
|
||||
use ast::AstAnalysis;
|
||||
use crlf::crlfify;
|
||||
use error::Error;
|
||||
use literal::LiteralSets;
|
||||
use multi::alternation_literals;
|
||||
use non_matching::non_matching_bytes;
|
||||
use strip::strip_from_match;
|
||||
use crate::ast::AstAnalysis;
|
||||
use crate::crlf::crlfify;
|
||||
use crate::error::Error;
|
||||
use crate::literal::LiteralSets;
|
||||
use crate::multi::alternation_literals;
|
||||
use crate::non_matching::non_matching_bytes;
|
||||
use crate::strip::strip_from_match;
|
||||
|
||||
/// Config represents the configuration of a regex matcher in this crate.
|
||||
/// The configuration is itself a rough combination of the knobs found in
|
||||
|
@ -4,9 +4,9 @@ use grep_matcher::{Match, Matcher, NoError};
|
||||
use regex::bytes::Regex;
|
||||
use regex_syntax::hir::{self, Hir, HirKind};
|
||||
|
||||
use config::ConfiguredHIR;
|
||||
use error::Error;
|
||||
use matcher::RegexCaptures;
|
||||
use crate::config::ConfiguredHIR;
|
||||
use crate::error::Error;
|
||||
use crate::matcher::RegexCaptures;
|
||||
|
||||
/// A matcher for implementing "word match" semantics.
|
||||
#[derive(Clone, Debug)]
|
||||
|
@ -1,7 +1,7 @@
|
||||
use std::error;
|
||||
use std::fmt;
|
||||
|
||||
use util;
|
||||
use crate::util;
|
||||
|
||||
/// An error that can occur in this crate.
|
||||
///
|
||||
|
@ -13,8 +13,8 @@ extern crate regex;
|
||||
extern crate regex_syntax;
|
||||
extern crate thread_local;
|
||||
|
||||
pub use error::{Error, ErrorKind};
|
||||
pub use matcher::{RegexCaptures, RegexMatcher, RegexMatcherBuilder};
|
||||
pub use crate::error::{Error, ErrorKind};
|
||||
pub use crate::matcher::{RegexCaptures, RegexMatcher, RegexMatcherBuilder};
|
||||
|
||||
mod ast;
|
||||
mod config;
|
||||
|
@ -9,7 +9,7 @@ use bstr::ByteSlice;
|
||||
use regex_syntax::hir::literal::{Literal, Literals};
|
||||
use regex_syntax::hir::{self, Hir, HirKind};
|
||||
|
||||
use util;
|
||||
use crate::util;
|
||||
|
||||
/// Represents prefix, suffix and inner "required" literals for a regular
|
||||
/// expression.
|
||||
|
@ -5,11 +5,11 @@ use grep_matcher::{
|
||||
};
|
||||
use regex::bytes::{CaptureLocations, Regex};
|
||||
|
||||
use config::{Config, ConfiguredHIR};
|
||||
use crlf::CRLFMatcher;
|
||||
use error::Error;
|
||||
use multi::MultiLiteralMatcher;
|
||||
use word::WordMatcher;
|
||||
use crate::config::{Config, ConfiguredHIR};
|
||||
use crate::crlf::CRLFMatcher;
|
||||
use crate::error::Error;
|
||||
use crate::multi::MultiLiteralMatcher;
|
||||
use crate::word::WordMatcher;
|
||||
|
||||
/// A builder for constructing a `Matcher` using regular expressions.
|
||||
///
|
||||
|
@ -2,8 +2,8 @@ use aho_corasick::{AhoCorasick, AhoCorasickBuilder, MatchKind};
|
||||
use grep_matcher::{Match, Matcher, NoError};
|
||||
use regex_syntax::hir::Hir;
|
||||
|
||||
use error::Error;
|
||||
use matcher::RegexCaptures;
|
||||
use crate::error::Error;
|
||||
use crate::matcher::RegexCaptures;
|
||||
|
||||
/// A matcher for an alternation of literals.
|
||||
///
|
||||
|
@ -1,7 +1,7 @@
|
||||
use grep_matcher::LineTerminator;
|
||||
use regex_syntax::hir::{self, Hir, HirKind};
|
||||
|
||||
use error::{Error, ErrorKind};
|
||||
use crate::error::{Error, ErrorKind};
|
||||
|
||||
/// Return an HIR that is guaranteed to never match the given line terminator,
|
||||
/// if possible.
|
||||
@ -106,7 +106,7 @@ mod tests {
|
||||
use regex_syntax::Parser;
|
||||
|
||||
use super::{strip_from_match, LineTerminator};
|
||||
use error::Error;
|
||||
use crate::error::Error;
|
||||
|
||||
fn roundtrip(pattern: &str, byte: u8) -> String {
|
||||
roundtrip_line_term(pattern, LineTerminator::byte(byte)).unwrap()
|
||||
|
@ -6,9 +6,9 @@ use grep_matcher::{Match, Matcher, NoError};
|
||||
use regex::bytes::{CaptureLocations, Regex};
|
||||
use thread_local::ThreadLocal;
|
||||
|
||||
use config::ConfiguredHIR;
|
||||
use error::Error;
|
||||
use matcher::RegexCaptures;
|
||||
use crate::config::ConfiguredHIR;
|
||||
use crate::error::Error;
|
||||
use crate::matcher::RegexCaptures;
|
||||
|
||||
/// A matcher for implementing "word match" semantics.
|
||||
#[derive(Debug)]
|
||||
@ -184,7 +184,7 @@ impl Matcher for WordMatcher {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::WordMatcher;
|
||||
use config::Config;
|
||||
use crate::config::Config;
|
||||
use grep_matcher::{Captures, Match, Matcher};
|
||||
|
||||
fn matcher(pattern: &str) -> WordMatcher {
|
||||
|
Reference in New Issue
Block a user