mirror of
https://github.com/sharkdp/fd.git
synced 2026-10-07 17:49:03 +02:00
This refactors the sanitization code somewhat, to provide a couple benefits: - Ensure we sanitize output in error messages (#2119), while not escaping newlines from error messages. - Avoids some unnecessary allocations and string copies - Makes `print_error` a little nicer to use. As a macro, it avoids needing a separate call to `format!`. The main downside is added complexity. Fixes: #2119