Skip to content
Myr

Use .to_string() instead of .description()

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by sharkdp · committed by sharkdp · parent e5e14f3 · Browse files · 2 files+4 added−7 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+4 added−7 removed

  • other:+4 added−7 removed

2 files+4 added−7 removed

modified:src/main.rs+2 added-3 removed
15 unmodified lines
16mod output;17mod walk;1819use std::env;20use std::error::Error;20use std::path::{Path, PathBuf};21use std::process;22use std::sync::Arc;23use std::time;
237 unmodified lines
261 .build()262 {263 Ok(re) => re,264 Err(err) => {266 print_error_and_exit!("{}", err.description());265 print_error_and_exit!("{}", err.to_string());266 }267 }268 }),269 command: command.map(Arc::new),
23 unmodified lines
293 Err(err) => {294 print_error_and_exit!(295 "{}\nHint: You can use the '--fixed-strings' option to search for a \296 literal string instead of a regular expression",298 err.description()297 err.to_string()298 );299 }300 }301}
modified:src/walk.rs+2 added-4 removed
11 unmodified lines
12use crate::internal::{opts::FdOptions, osstr_to_bytes, MAX_BUFFER_LENGTH};13use crate::output;1415use std::borrow::Cow;16use std::error::Error;16use std::ffi::OsStr;17use std::fs::{FileType, Metadata};18use std::io;19use std::path::{Path, PathBuf};
73 unmodified lines
93 Some(err) => {94 print_error!(95 "{}",96 format!(98 "Malformed pattern in custom ignore file '{}': {}.",99 ignore_file.to_string_lossy(),100 err.description()97 "Malformed pattern in custom ignore file. {}.",98 err.to_string()99 )100 );101 }102 None => (),
338 unmodified lines