fix: replace unwrap/expect in production paths with fallible alternatives

This commit is contained in:
2026-03-04 13:29:33 +01:00
parent cab03bd3f7
commit a8ed3c4356
5 changed files with 35 additions and 5 deletions

View File

@@ -32,7 +32,10 @@ pub struct ClientConfig {
impl Default for ClientConfig {
fn default() -> Self {
Self {
server_addr: "127.0.0.1:7000".parse().expect("valid addr"),
server_addr: std::net::SocketAddr::new(
std::net::IpAddr::V4(std::net::Ipv4Addr::new(127, 0, 0, 1)),
7000,
),
server_name: "localhost".to_string(),
db_path: PathBuf::from("conversations.db"),
db_password: None,