additional stream tools
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
a8d5cf9651
commit
6b80361c31
10 changed files with 242 additions and 46 deletions
10
src/core/result/into_is_ok.rs
Normal file
10
src/core/result/into_is_ok.rs
Normal file
|
@ -0,0 +1,10 @@
|
|||
use super::Result;
|
||||
|
||||
pub trait IntoIsOk<T, E> {
|
||||
fn into_is_ok(self) -> bool;
|
||||
}
|
||||
|
||||
impl<T, E> IntoIsOk<T, E> for Result<T, E> {
|
||||
#[inline]
|
||||
fn into_is_ok(self) -> bool { self.is_ok() }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue