Skip to content

Commit

Permalink
style: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveLauC committed Nov 17, 2024
1 parent 596280b commit 1cadebe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/syslog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ use std::ptr;
/// argument specifies logging options. The `facility` parameter encodes a default facility to be
/// assigned to all messages that do not have an explicit facility encoded.
//
// On Linux, the `ident` argument needs to have static lifetime according to the
// On Linux, the `ident` argument needs to have static lifetime according to the
// man page:
//
// The argument ident in the call of openlog() is probably stored as-is. Thus,
//
// The argument ident in the call of openlog() is probably stored as-is. Thus,
// if the string it points to is changed, syslog() may start prepending the changed
// string, and if the string it points to ceases to exist, the results are
// string, and if the string it points to ceases to exist, the results are
// undefined. Most portable is to use a string constant.
#[cfg(target_os = "linux")]
pub fn openlog(
Expand All @@ -33,7 +33,7 @@ pub fn openlog(
libc::openlog(ident.as_ptr(), logopt, facility);
})?,
}

Ok(())
}

Expand All @@ -58,7 +58,7 @@ pub fn openlog<S: AsRef<OsStr> + ?Sized>(
libc::openlog(ident.as_ptr(), logopt, facility);
})?,
}

Ok(())
}

Expand Down

0 comments on commit 1cadebe

Please sign in to comment.