Remove warning when using --preview on stdin input (#259)

This commit is contained in:
CosmicHorror 2023-10-30 19:58:14 -06:00 committed by GitHub
parent a88673b18e
commit 1ac5fbc551
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,10 +58,7 @@ impl App {
let is_tty = std::io::stdout().is_terminal();
match (&self.source, preview) {
(Source::Stdin, true) => {
eprintln!("WARN: `--preview` flag is redundant");
self.stdin_replace(is_tty)
}
(Source::Stdin, true) => self.stdin_replace(is_tty),
(Source::Stdin, false) => self.stdin_replace(is_tty),
(Source::Files(paths), false) => {
use rayon::prelude::*;