#![deny(missing_docs)]
#![forbid(unsafe_code)]
#![no_std]
#![doc = include_str!("../README.md")]
use core::fmt::Debug;
pub trait UnwrapTodo {
type Target;
fn todo(self) -> Self::Target;
}
impl<T> UnwrapTodo for Option<T> {
type Target = T;
fn todo(self) -> Self::Target {
match self {
Some(t) => t,
None => {
panic!("None handling not yet implemented")
}
}
}
}
impl<T, E> UnwrapTodo for Result<T, E>
where
E: Debug,
{
type Target = T;
fn todo(self) -> Self::Target {
match self {
Ok(t) => t,
Err(e) => {
panic!("Err handling not yet implemented: {e:?}")
}
}
}
}