add default implementation

This commit is contained in:
yggverse 2024-11-30 01:59:40 +02:00
parent c3a76472d2
commit 7db362aadc
2 changed files with 12 additions and 0 deletions

View file

@ -27,6 +27,12 @@ pub struct Client {
pub socket: SocketClient, pub socket: SocketClient,
} }
impl Default for Client {
fn default() -> Self {
Self::new()
}
}
impl Client { impl Client {
// Constructors // Constructors

View file

@ -7,6 +7,12 @@ pub struct Session {
index: RefCell<HashMap<String, Rc<Connection>>>, index: RefCell<HashMap<String, Rc<Connection>>>,
} }
impl Default for Session {
fn default() -> Self {
Self::new()
}
}
impl Session { impl Session {
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {