Files
tuwunel/src/core/result/not_found.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
258 B
Rust
Raw Normal View History

use super::Result;
use crate::{error, 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) }
}