use std::fmt;
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub(crate) enum LauncherTie {
Confirmed,
Unknown,
NoneDetected,
}
impl LauncherTie {
pub(crate) const fn warrants_warning(self) -> bool {
!matches!(self, Self::NoneDetected)
}
}
#[cfg_attr(coverage_nightly, coverage(off))]
#[cfg_attr(test, mutants::skip)]
impl fmt::Display for LauncherTie {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let note = match self {
Self::Confirmed => "tied to the launcher, so it will not survive it",
Self::Unknown => "could not be established",
Self::NoneDetected => "no immediate tie to the launcher found",
};
f.write_str(note)
}
}