Skip to content
Myr

Move error macros to error.rs

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

authored by sharkdp · committed by David Peter · parent 65096a6 · Browse files · 3 files+12 added−12 removed
This commit

State

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

Diff stats

3 files+12 added−12 removed

  • other:+12 added−12 removed

3 files+12 added−12 removed

modified:src/internal/mod.rs-11 removed
2 unmodified lines
34use regex_syntax::hir::Hir;5use regex_syntax::ParserBuilder;67macro_rules! print_error {8 ($($arg:tt)*) => (eprintln!("[fd error]: {}", format!($($arg)*)))9}1011macro_rules! print_error_and_exit {12 ($($arg:tt)*) => {13 print_error!($($arg)*);14 ::std::process::exit(1);15 };16}177#[cfg(any(unix, target_os = "redox"))]8pub fn osstr_to_bytes(input: &OsStr) -> Cow<[u8]> {9 use std::os::unix::ffi::OsStrExt;10 Cow::Borrowed(input.as_bytes())
162 unmodified lines
added:src/error.rs+10 added
1macro_rules! print_error {2 ($($arg:tt)*) => (eprintln!("[fd error]: {}", format!($($arg)*)))3}45macro_rules! print_error_and_exit {6 ($($arg:tt)*) => {7 print_error!($($arg)*);8 ::std::process::exit(1);9 };10}
modified:src/main.rs+2 added-1 removed
1#[macro_use]2mod internal;2mod error;34mod app;5mod exec;6mod exit_codes;7mod filetypes;8mod filter;9mod fshelper;10mod internal;11mod options;12mod output;13mod walk;14
305 unmodified lines