return NetworkAddress on Error::Connect

This commit is contained in:
yggverse 2025-07-22 09:49:39 +03:00
parent cc1018224a
commit e878fe4ba2
2 changed files with 3 additions and 3 deletions

View file

@ -96,7 +96,7 @@ impl Client {
}
}
}
Err(e) => callback(Err(Error::Connect(e))),
Err(e) => callback(Err(Error::Connect(network_address, e))),
}
})
}

View file

@ -2,7 +2,7 @@ use std::fmt::{Display, Formatter, Result};
#[derive(Debug)]
pub enum Error {
Connect(glib::Error),
Connect(gio::NetworkAddress, glib::Error),
Connection(gio::SocketConnection, crate::client::connection::Error),
NetworkAddress(crate::client::connection::request::Error),
Request(crate::client::connection::Error),
@ -11,7 +11,7 @@ pub enum Error {
impl Display for Error {
fn fmt(&self, f: &mut Formatter) -> Result {
match self {
Self::Connect(e) => {
Self::Connect(_, e) => {
write!(f, "Connect error: {e}")
}
Self::Connection(_, e) => {