Improve code style

This commit is contained in:
Kevin Yue
2024-04-07 08:20:36 -04:00
committed by Kevin Yue
parent a884c41813
commit 9f085e8b8c
3 changed files with 14 additions and 15 deletions

View File

@@ -130,13 +130,15 @@ pub struct GpParamsBuilder {
impl GpParamsBuilder {
pub fn new() -> Self {
let computer = whoami::fallible::hostname().unwrap_or_else(|_| String::from("localhost"));
Self {
is_gateway: false,
user_agent: GP_USER_AGENT.to_string(),
client_os: ClientOs::Linux,
os_version: Default::default(),
client_version: Default::default(),
computer: whoami::hostname(),
computer,
ignore_tls_errors: false,
}
}