more refactor

This commit is contained in:
2025-11-18 02:38:23 -05:00
parent db15f43610
commit 01cd02c0f9
11 changed files with 39 additions and 24 deletions

View File

@@ -7,8 +7,6 @@ use directories_next::ProjectDirs;
use crate::net::BINCODE_CONFIG;
pub const CLIENT_DATA: &str = "client_data";
pub struct DataDir {
dirs: ProjectDirs,
}
@@ -44,18 +42,3 @@ impl DataDir {
bincode::encode_into_std_write(data, &mut file, BINCODE_CONFIG).unwrap();
}
}
#[derive(bincode::Encode, bincode::Decode)]
pub struct ClientData {
pub ip: String,
pub username: String,
}
impl Default for ClientData {
fn default() -> Self {
Self {
ip: "localhost:39420".to_string(),
username: "your [NOVEMBER]".to_string(),
}
}
}