Skip to content

Commit

Permalink
fix: use to_string for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
ecyrbe committed Feb 23, 2020
1 parent 674d08c commit 1c9dae4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/ops/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ fn op_hostname(
_zero_copy: Option<ZeroCopyBuf>,
) -> Result<JsonOp, ErrBox> {
state.check_env()?;
let hostname = sys_info::hostname().unwrap_or_else(|_| "".to_owned());
let hostname = sys_info::hostname().unwrap_or_else(|_| "".to_string());
Ok(JsonOp::Sync(json!(hostname)))
}

Expand All @@ -195,6 +195,6 @@ fn op_os_release(
_zero_copy: Option<ZeroCopyBuf>,
) -> Result<JsonOp, ErrBox> {
state.check_env()?;
let release = sys_info::os_release().unwrap_or_else(|_| "".to_owned());
let release = sys_info::os_release().unwrap_or_else(|_| "".to_string());
Ok(JsonOp::Sync(json!(release)))
}

0 comments on commit 1c9dae4

Please sign in to comment.