mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-19 02:10:34 +01:00
Use .to_string() instead of .description()
This commit is contained in:
parent
e5e14f31c4
commit
44605d55dd
2 changed files with 4 additions and 7 deletions
|
@ -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()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue