mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
update enum names
This commit is contained in:
parent
5737b89278
commit
017a63b4e5
2 changed files with 8 additions and 6 deletions
|
|
@ -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}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue