Files
tokio/tokio-buf/src/never.rs
T

19 lines
358 B
Rust
Raw Normal View History

2019-02-23 10:17:21 -08:00
use std::{error, fmt};
/// An error that can never occur
pub enum Never {}
impl fmt::Debug for Never {
2019-05-14 10:27:36 -07:00
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
2019-02-23 10:17:21 -08:00
match *self {}
}
}
impl fmt::Display for Never {
2019-05-14 10:27:36 -07:00
fn fmt(&self, _f: &mut fmt::Formatter<'_>) -> fmt::Result {
2019-02-23 10:17:21 -08:00
match *self {}
}
}
impl error::Error for Never {}