Fix cargo clippy warning
Signed-off-by: Gris Ge <fge@redhat.com>
This commit is contained in:
parent
d3c67303fd
commit
dee647ee1b
@ -76,7 +76,7 @@ pub(crate) fn set_running_hostname(hostname: &str) -> Result<(), NmstateError> {
|
||||
}
|
||||
|
||||
let os_str = std::ffi::OsStr::new(hostname);
|
||||
if nix::unistd::sethostname(&os_str).is_err() {
|
||||
if nix::unistd::sethostname(os_str).is_err() {
|
||||
let e = NmstateError::new(
|
||||
ErrorKind::InvalidArgument,
|
||||
format!(
|
||||
|
Loading…
x
Reference in New Issue
Block a user