Fix non-empty Void
This commit is contained in:
parent
eca333a9ec
commit
835c721a12
@ -7,7 +7,7 @@ use std::fmt::{self, Display, Formatter};
|
|||||||
// FIXME when `!` becomes stable use it
|
// FIXME when `!` becomes stable use it
|
||||||
/// Default `ResponseError` for `ruma_api!` macro
|
/// Default `ResponseError` for `ruma_api!` macro
|
||||||
#[derive(Clone, Copy, Debug)]
|
#[derive(Clone, Copy, Debug)]
|
||||||
pub struct Void;
|
pub enum Void {}
|
||||||
|
|
||||||
impl crate::EndpointError for Void {
|
impl crate::EndpointError for Void {
|
||||||
fn try_from_response(
|
fn try_from_response(
|
||||||
@ -19,7 +19,7 @@ impl crate::EndpointError for Void {
|
|||||||
|
|
||||||
impl Display for Void {
|
impl Display for Void {
|
||||||
fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match self {}
|
match *self {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user