aboutsummaryrefslogtreecommitdiff
path: root/src/never.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/never.rs')
-rw-r--r--src/never.rs21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/never.rs b/src/never.rs
deleted file mode 100644
index 85a1243..0000000
--- a/src/never.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-use std::error;
-use std::fmt;
-
-/// Definition of an empty enum.
-///
-/// This is used as the error type in situations where there can't be an error. A `Result<T, Never>`
-/// can be safely unwrapped and the `unwrap()` may be optimized away entirely.
-pub enum Never {}
-
-impl fmt::Display for Never {
- fn fmt(&self, _: &mut fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
- match *self {}
- }
-}
-impl fmt::Debug for Never {
- fn fmt(&self, _: &mut fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
- match *self {}
- }
-}
-
-impl error::Error for Never {}