update enum names

This commit is contained in:
yggverse 2024-11-27 16:11:30 +02:00
parent 5737b89278
commit 017a63b4e5
2 changed files with 8 additions and 6 deletions

View file

@ -2,15 +2,17 @@ use std::fmt::{Display, Formatter, Result};
#[derive(Debug)]
pub enum Error {
Closed,
Tls(glib::Error),
SocketConnectionClosed,
TlsClientConnection(glib::Error),
}
impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result {
match self {
Self::Closed => write!(f, "Socket connection closed"),
Self::Tls(reason) => write!(f, "Could not create TLS connection: {reason}"),
Self::SocketConnectionClosed => write!(f, "Socket connection closed"),
Self::TlsClientConnection(reason) => {
write!(f, "Could not create TLS connection: {reason}")
}
}
}
}