Tracking issue for Option::contains
and Result::contains
· Issue #62358 · rust-lang/rust (original) (raw)
This is a tracking issue for Option::contains
and Result::contains
.
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,
}
}
``