use core::convert::Infallible;
use crate::Signal;
pub type Never = Infallible;
pub trait NeverMapIntoExtension {
fn map_into<T>() -> impl Fn(Never) -> T + Signal + Clone;
}
impl NeverMapIntoExtension for Never {
fn map_into<T>() -> impl Fn(Never) -> T + Signal + Clone {
|_| unreachable!("Never cannot be created!")
}
}
#[cfg(test)]
mod test {
use super::*;
#[test]
fn should_return_a_function_that_cant_be_called_but_its_return_type_can_be_anything() {
let _impossible = Never::map_into::<usize>();
}
}