Tracking issue for Option::contains
and Result::contains
(original) (raw)
This is a tracking issue for Option::contains
and Result::contains
.
The implementations are as follows:
pub fn contains(&self, x: &T) -> bool where T: PartialEq {
match self {
Some(y) => y == x,
None => false,
}
}
pub fn contains(&self, x: &T) -> bool where T: PartialEq {
match self {
Ok(y) => y == x,
Err(_) => false,
}
}
``