Use .to_string() instead of .description()

This commit is contained in:
sharkdp 2020-03-22 15:54:43 +01:00
parent e5e14f31c4
commit 44605d55dd
2 changed files with 4 additions and 7 deletions

View file

@ -17,7 +17,6 @@ mod output;
mod walk;
use std::env;
use std::error::Error;
use std::path::{Path, PathBuf};
use std::process;
use std::sync::Arc;
@ -263,7 +262,7 @@ fn main() {
{
Ok(re) => re,
Err(err) => {
print_error_and_exit!("{}", err.description());
print_error_and_exit!("{}", err.to_string());
}
}
}),
@ -295,7 +294,7 @@ fn main() {
print_error_and_exit!(
"{}\nHint: You can use the '--fixed-strings' option to search for a \
literal string instead of a regular expression",
err.description()
err.to_string()
);
}
}

View file

@ -13,7 +13,6 @@ use crate::internal::{opts::FdOptions, osstr_to_bytes, MAX_BUFFER_LENGTH};
use crate::output;
use std::borrow::Cow;
use std::error::Error;
use std::ffi::OsStr;
use std::fs::{FileType, Metadata};
use std::io;
@ -95,9 +94,8 @@ pub fn scan(path_vec: &[PathBuf], pattern: Arc<Regex>, config: Arc<FdOptions>) -
print_error!(
"{}",
format!(
"Malformed pattern in custom ignore file '{}': {}.",
ignore_file.to_string_lossy(),
err.description()
"Malformed pattern in custom ignore file. {}.",
err.to_string()
)
);
}