mirror of https://github.com/sharkdp/fd.git
Use .to_string() instead of .description()
This commit is contained in:
parent
e5e14f31c4
commit
44605d55dd
|
@ -17,7 +17,6 @@ mod output;
|
||||||
mod walk;
|
mod walk;
|
||||||
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::error::Error;
|
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::process;
|
use std::process;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
@ -263,7 +262,7 @@ fn main() {
|
||||||
{
|
{
|
||||||
Ok(re) => re,
|
Ok(re) => re,
|
||||||
Err(err) => {
|
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!(
|
print_error_and_exit!(
|
||||||
"{}\nHint: You can use the '--fixed-strings' option to search for a \
|
"{}\nHint: You can use the '--fixed-strings' option to search for a \
|
||||||
literal string instead of a regular expression",
|
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 crate::output;
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::error::Error;
|
|
||||||
use std::ffi::OsStr;
|
use std::ffi::OsStr;
|
||||||
use std::fs::{FileType, Metadata};
|
use std::fs::{FileType, Metadata};
|
||||||
use std::io;
|
use std::io;
|
||||||
|
@ -95,9 +94,8 @@ pub fn scan(path_vec: &[PathBuf], pattern: Arc<Regex>, config: Arc<FdOptions>) -
|
||||||
print_error!(
|
print_error!(
|
||||||
"{}",
|
"{}",
|
||||||
format!(
|
format!(
|
||||||
"Malformed pattern in custom ignore file '{}': {}.",
|
"Malformed pattern in custom ignore file. {}.",
|
||||||
ignore_file.to_string_lossy(),
|
err.to_string()
|
||||||
err.description()
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue