Fix non-empty Void

This commit is contained in:
Jonas Platte 2020-08-12 14:21:50 +02:00
parent eca333a9ec
commit 835c721a12
No known key found for this signature in database
GPG Key ID: 7D261D771D915378

View File

@ -7,7 +7,7 @@ use std::fmt::{self, Display, Formatter};
// FIXME when `!` becomes stable use it
/// Default `ResponseError` for `ruma_api!` macro
#[derive(Clone, Copy, Debug)]
pub struct Void;
pub enum Void {}
impl crate::EndpointError for Void {
fn try_from_response(
@ -19,7 +19,7 @@ impl crate::EndpointError for Void {
impl Display for Void {
fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {}
match *self {}
}
}