Skip to content

Conversation

@joebb97
Copy link

@joebb97 joebb97 commented Jan 9, 2026

Saves from having to do

impl ServerSettings {
    fn default_bind_address() -> SocketAddr {
       "127.0.0.1:8080".parse::<std::net::SocketAddr>().unwrap().into()
    }
}

Instead we can just do

impl ServerSettings {
    fn default_bind_address() -> SocketAddr {
       "127.0.0.1:8080".parse()
    }
}

Saves from having to do

impl ServerSettings {
    fn default_bind_address() -> SocketAddr {
       "127.0.0.1:8080".parse::<std::net::SocketAddr>().unwrap().into()
    }
}

Instead we can just do

impl ServerSettings {
    fn default_bind_address() -> SocketAddr {
       "127.0.0.1:8080".parse()
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant