mirror of
https://git.intege.rs/xlib/anything
synced 2025-12-05 20:35:02 +00:00
cleanup
This commit is contained in:
11
src/nothing.rs
Normal file
11
src/nothing.rs
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
pub auto trait NotNothing {}
|
||||
impl !NotNothing for Nothing {}
|
||||
impl <T> NotNothing for alloc::boxed::Box<T> {}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Nothing;
|
||||
|
||||
impl<T: NotNothing> From<T> for Nothing {
|
||||
fn from(_: T) -> Self { Nothing }
|
||||
}
|
||||
Reference in New Issue
Block a user