mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-03-17 20:28:03 +02:00
style: fix new lints
The Rust compiler seems to have gotten smarter at finding unused or redundant imports.
This commit is contained in:
parent
6ebebb2aaa
commit
59212d08d3
@ -1,6 +1,6 @@
|
|||||||
use std::io::{self, IsTerminal};
|
use std::io::{self, IsTerminal};
|
||||||
|
|
||||||
use termcolor::{self, HyperlinkSpec};
|
use termcolor::HyperlinkSpec;
|
||||||
|
|
||||||
/// A writer that supports coloring with either line or block buffering.
|
/// A writer that supports coloring with either line or block buffering.
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -6,7 +6,7 @@ print to stderr. We therefore avoid bringing in extra dependencies just for
|
|||||||
this functionality.
|
this functionality.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use log::{self, Log};
|
use log::Log;
|
||||||
|
|
||||||
/// The simplest possible logger that logs to stderr.
|
/// The simplest possible logger that logs to stderr.
|
||||||
///
|
///
|
||||||
|
@ -11,7 +11,7 @@ use std::{
|
|||||||
use {
|
use {
|
||||||
crossbeam_deque::{Stealer, Worker as Deque},
|
crossbeam_deque::{Stealer, Worker as Deque},
|
||||||
same_file::Handle,
|
same_file::Handle,
|
||||||
walkdir::{self, WalkDir},
|
walkdir::WalkDir,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
@ -428,7 +428,7 @@ fn has_uppercase_literal(pattern: &str) -> bool {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use grep_matcher::{LineMatchKind, Matcher};
|
use grep_matcher::LineMatchKind;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
@ -552,8 +552,6 @@ impl RegexCaptures {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use grep_matcher::{LineMatchKind, Matcher};
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
// Test that enabling word matches does the right thing and demonstrate
|
// Test that enabling word matches does the right thing and demonstrate
|
||||||
|
@ -548,7 +548,7 @@ fn replace_bytes(
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use bstr::{ByteSlice, ByteVec};
|
use bstr::ByteVec;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
|
@ -198,8 +198,6 @@ fn preceding_by_pos(
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use grep_matcher::Match;
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
const SHERLOCK: &'static str = "\
|
const SHERLOCK: &'static str = "\
|
||||||
|
@ -7,7 +7,6 @@ use std::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use {
|
use {
|
||||||
encoding_rs,
|
|
||||||
encoding_rs_io::DecodeReaderBytesBuilder,
|
encoding_rs_io::DecodeReaderBytesBuilder,
|
||||||
grep_matcher::{LineTerminator, Match, Matcher},
|
grep_matcher::{LineTerminator, Match, Matcher},
|
||||||
};
|
};
|
||||||
|
@ -725,8 +725,6 @@ impl TesterConfig {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use grep_matcher::{Match, Matcher};
|
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
fn m(start: usize, end: usize) -> Match {
|
fn m(start: usize, end: usize) -> Match {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user