blob: a46581ba997d4b5f21311e92a0eb1c1c1b845190 [file] [log] [blame]
David Tolnaye2e47a32020-09-24 10:23:27 -04001use std::path::PathBuf;
2
3#[derive(Debug)]
4pub(crate) enum Output {
5 Stdout,
6 File(PathBuf),
7}
8
9impl Output {
10 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}