Skip to content

Commit d533cdf

Browse files
committed
Clean up warnings
1 parent 6fa7b92 commit d533cdf

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

tracing-journald/src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,11 +515,11 @@ pub struct PriorityMappings {
515515
impl PriorityMappings {
516516
/// Returns the default priority mappings:
517517
///
518-
/// - [`tracing::Level::ERROR`]: [`Priority::Error`] (3)
519-
/// - [`tracing::Level::WARN`]: [`Priority::Warning`] (4)
520-
/// - [`tracing::Level::INFO`]: [`Priority::Notice`] (5)
521-
/// - [`tracing::Level::DEBUG`]: [`Priority::Informational`] (6)
522-
/// - [`tracing::Level::TRACE`]: [`Priority::Debug`] (7)
518+
/// - [`tracing::Level::ERROR`][]: [`Priority::Error`] (3)
519+
/// - [`tracing::Level::WARN`][]: [`Priority::Warning`] (4)
520+
/// - [`tracing::Level::INFO`][]: [`Priority::Notice`] (5)
521+
/// - [`tracing::Level::DEBUG`][]: [`Priority::Informational`] (6)
522+
/// - [`tracing::Level::TRACE`][]: [`Priority::Debug`] (7)
523523
pub fn new() -> PriorityMappings {
524524
Self {
525525
error: Priority::Error,

tracing-log/src/interest_cache.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,9 @@ mod tests {
499499
.target("dummy_2")
500500
.build();
501501
try_cache(&metadata_1, || true);
502-
assert_eq!(try_cache(&metadata_1, || { unreachable!() }), true);
502+
assert!(try_cache(&metadata_1, || { unreachable!() }));
503503
try_cache(&metadata_2, || false);
504-
assert_eq!(try_cache(&metadata_2, || { unreachable!() }), false);
504+
assert!(!try_cache(&metadata_2, || { unreachable!() }));
505505
})
506506
.join()
507507
.unwrap();
@@ -521,7 +521,7 @@ mod tests {
521521
.build();
522522

523523
try_cache(&metadata_1, || true);
524-
assert_eq!(try_cache(&metadata_1, || { unreachable!() }), true);
524+
assert!(try_cache(&metadata_1, || { unreachable!() }));
525525

526526
*target.last_mut().unwrap() = b'2';
527527
let metadata_2 = log::MetadataBuilder::new()
@@ -530,7 +530,7 @@ mod tests {
530530
.build();
531531

532532
try_cache(&metadata_2, || false);
533-
assert_eq!(try_cache(&metadata_2, || { unreachable!() }), false);
533+
assert!(!try_cache(&metadata_2, || { unreachable!() }));
534534
})
535535
.join()
536536
.unwrap();

tracing-subscriber/src/fmt/time/chrono_crate.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1+
//! Formats [local time]s and [UTC time]s with `FormatTime` implementations
2+
//! that use the [`chrono` crate].
3+
//!
4+
//! [local time]: [`chrono::offset::Local`]
5+
//! [UTC time]: [`chrono::offset::Utc`]
6+
//! [`chrono` crate]: [`chrono`]
7+
18
use crate::fmt::format::Writer;
29
use crate::fmt::time::FormatTime;
310

411
use std::sync::Arc;
512

6-
/// Formats [local time]s and [UTC time]s with `FormatTime` implementations
7-
/// that use the [`chrono` crate].
8-
///
9-
/// [local time]: [`chrono::offset::Local`]
10-
/// [UTC time]: [`chrono::offset::Utc`]
11-
/// [`chrono` crate]: [`chrono`]
12-
1313
/// Formats the current [local time] using a [formatter] from the [`chrono`] crate.
1414
///
1515
/// [local time]: chrono::Local::now()

tracing/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ pub mod log {
10801080
pub(crate) is_first: bool,
10811081
}
10821082

1083-
impl<'a> fmt::Display for LogValueSet<'a> {
1083+
impl fmt::Display for LogValueSet<'_> {
10841084
#[inline]
10851085
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
10861086
struct LogVisitor<'a, 'b> {

0 commit comments

Comments
 (0)