move core result into core utils

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-10-24 01:31:30 +00:00 committed by strawberry
parent 5cb0a5f676
commit c769fcc347
12 changed files with 2 additions and 3 deletions

View file

@ -1,12 +0,0 @@
use super::Result;
use crate::Error;
pub trait NotFound<T> {
#[must_use]
fn is_not_found(&self) -> bool;
}
impl<T> NotFound<T> for Result<T, Error> {
#[inline]
fn is_not_found(&self) -> bool { self.as_ref().is_err_and(Error::is_not_found) }
}