Cargo fmt
This commit is contained in:
@@ -92,7 +92,13 @@ impl<L: LogSink> LogParams<L> {
|
||||
.unwrap_or(true)
|
||||
{
|
||||
// Try reopening the log file once and retrying as musl does.
|
||||
if !(self.open_logger().is_ok() && self.writer.as_mut().and_then(|w| w.writer().write_all(&buffer).ok()).is_some()) && self.opt.contains(Config::Console)
|
||||
if !(self.open_logger().is_ok()
|
||||
&& self
|
||||
.writer
|
||||
.as_mut()
|
||||
.and_then(|w| w.writer().write_all(&buffer).ok())
|
||||
.is_some())
|
||||
&& self.opt.contains(Config::Console)
|
||||
{
|
||||
// TODO: Log error to /dev/console & Redox equivalent
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ pub extern "C" fn clock() -> clock_t {
|
||||
}
|
||||
let ts = unsafe { ts.assume_init() };
|
||||
|
||||
#[expect(clippy::unnecessary_cast, reason="needed on i586")]
|
||||
#[expect(clippy::unnecessary_cast, reason = "needed on i586")]
|
||||
let clocks =
|
||||
ts.tv_sec * CLOCKS_PER_SEC as i64 + (ts.tv_nsec / (1_000_000_000 / CLOCKS_PER_SEC)) as i64;
|
||||
clock_t::try_from(clocks).unwrap_or(-1)
|
||||
@@ -851,8 +851,9 @@ unsafe fn set_timezone(
|
||||
|
||||
match dst {
|
||||
Some(dst) => {
|
||||
guard.1 =
|
||||
Some(CString::new(dst.offset().abbreviation().expect("Wrong timezone")).unwrap());
|
||||
guard.1 = Some(
|
||||
CString::new(dst.offset().abbreviation().expect("Wrong timezone")).unwrap(),
|
||||
);
|
||||
tzname.0[1] = guard.1.as_ref().unwrap().as_ptr().cast_mut();
|
||||
daylight = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user