1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-06-14 22:15:13 +02:00

edition: manual changes

This is mostly just about removing 'extern crate' everywhere and fixing
the fallout.
This commit is contained in:
Andrew Gallant
2021-06-01 20:45:45 -04:00
parent af54069c51
commit e824531e38
34 changed files with 93 additions and 182 deletions

View File

@ -230,7 +230,7 @@ impl DecompressionReaderBuilder {
match self.command_builder.build(&mut cmd) {
Ok(cmd_reader) => Ok(DecompressionReader { rdr: Ok(cmd_reader) }),
Err(err) => {
debug!(
log::debug!(
"{}: error spawning command '{:?}': {} \
(falling back to uncompressed reader)",
path.display(),
@ -479,7 +479,7 @@ fn default_decompression_commands() -> Vec<DecompressionCommand> {
let bin = match resolve_binary(Path::new(args[0])) {
Ok(bin) => bin,
Err(err) => {
debug!("{}", err);
log::debug!("{}", err);
return;
}
};

View File

@ -88,7 +88,7 @@ impl From<ParseSizeError> for io::Error {
///
/// Additional suffixes may be added over time.
pub fn parse_human_readable_size(size: &str) -> Result<u64, ParseSizeError> {
lazy_static! {
lazy_static::lazy_static! {
// Normally I'd just parse something this simple by hand to avoid the
// regex dep, but we bring regex in any way for glob matching, so might
// as well use it.

View File

@ -158,13 +158,6 @@ error message is crafted that typically tells the user how to fix the problem.
#![deny(missing_docs)]
use atty;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate log;
mod decompress;
mod escape;
mod human;

View File

@ -254,7 +254,7 @@ impl CommandReader {
impl Drop for CommandReader {
fn drop(&mut self) {
if let Err(error) = self.close() {
warn!("{}", error);
log::warn!("{}", error);
}
}
}