Skip to content

Commit

Permalink
Pass clippy by not capitalising acronyms
Browse files Browse the repository at this point in the history
  • Loading branch information
borntyping committed Dec 14, 2021
1 parent 15c60e9 commit 9cccc8a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const TIMESTAMP_FORMAT: &[FormatItem] = time::macros::format_description!(
enum Timestamps {
None,
Local,
UTC
Utc
}

/// Implements [`Log`] and a set of simple builder methods for configuration.
Expand Down Expand Up @@ -288,7 +288,7 @@ impl SimpleLogger {
#[must_use = "You must call init() to begin logging"]
#[cfg(feature = "timestamps")]
pub fn with_utc_timestamps(mut self) -> SimpleLogger {
self.timestamps = Timestamps::UTC;
self.timestamps = Timestamps::Utc;
self
}

Expand Down Expand Up @@ -414,7 +414,7 @@ impl Log for SimpleLogger {
"behaviour. See the time crate's documentation for more information. ",
"(https://time-rs.github.io/internal-api/time/index.html#feature-flags)"
)).format(&TIMESTAMP_FORMAT).unwrap()),
Timestamps::UTC => format!("{} ", OffsetDateTime::now_utc()),
Timestamps::Utc => format!("{} ", OffsetDateTime::now_utc()),
}

#[cfg(not(feature = "timestamps"))]
Expand Down Expand Up @@ -561,7 +561,7 @@ mod test {
#[cfg(feature = "timestamps")]
fn test_with_utc_timestamps() {
let builder = SimpleLogger::new().with_utc_timestamps();
assert!(builder.timestamps == Timestamps::UTC);
assert!(builder.timestamps == Timestamps::Utc);
}

#[test]
Expand Down

0 comments on commit 9cccc8a

Please sign in to comment.