blob: 58eb5494c035a1c0ed331195fcd4bf1a4530127a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub(crate) enum ArgPredicate<'help> {
IsPresent,
Equals(&'help std::ffi::OsStr),
}
impl<'help> From<Option<&'help std::ffi::OsStr>> for ArgPredicate<'help> {
fn from(other: Option<&'help std::ffi::OsStr>) -> Self {
match other {
Some(other) => Self::Equals(other),
None => Self::IsPresent,
}
}
}
|