Improve code style

This commit is contained in:
Kevin Yue authored and Kevin Yue committed 2024-04-07 20:31:05 +08:00
1 parent a884c41813
commit 9f085e8b8c
3 files changed
+14 -15

No files matched your search

+3 -1
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,
}
}