Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
dracarys18 committed Apr 20, 2024
1 parent 4fd623a commit 31542f3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions time/src/formatting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

pub(crate) mod formattable;
mod iso8601;
use core::{fmt, num::NonZeroU8};
use core::fmt;
use core::num::NonZeroU8;
use std::io;

use num_conv::prelude::*;
Expand Down Expand Up @@ -73,11 +74,7 @@ pub(crate) fn write(output: &mut impl io::Write, bytes: &[u8]) -> io::Result<usi

/// If `pred` is true, write all bytes to the output, returning the number of bytes written.
pub(crate) fn write_if(output: &mut impl io::Write, pred: bool, bytes: &[u8]) -> io::Result<usize> {
if pred {
write(output, bytes)
} else {
Ok(0)
}
if pred { write(output, bytes) } else { Ok(0) }
}

/// If `pred` is true, write `true_bytes` to the output. Otherwise, write `false_bytes`.
Expand Down

0 comments on commit 31542f3

Please sign in to comment.