1 use std::path::PathBuf; 2 3 #[derive(Debug)] 4 pub(crate) enum Output { 5 Stdout, 6 File(PathBuf), 7 } 8 9 impl Output { ends_with(&self, suffix: &str) -> bool10 pub(crate) fn ends_with(&self, suffix: &str) -> bool { 11 match self { 12 Output::Stdout => false, 13 Output::File(path) => path.to_string_lossy().ends_with(suffix), 14 } 15 } 16 } 17