Skip to content

Commit

Permalink
style: Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Dec 2, 2024
1 parent da7ff82 commit 240cd21
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/fmt/humantime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl fmt::Debug for Timestamp {
/// A `Debug` wrapper for `Timestamp` that uses the `Display` implementation.
struct TimestampValue<'a>(&'a Timestamp);

impl<'a> fmt::Debug for TimestampValue<'a> {
impl fmt::Debug for TimestampValue<'_> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt::Display::fmt(&self.0, f)
}
Expand Down
2 changes: 1 addition & 1 deletion src/fmt/kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pub fn default_kv_format(formatter: &mut Formatter, fields: &dyn Source) -> io::

struct DefaultVisitSource<'a>(&'a mut Formatter);

impl<'a, 'kvs> VisitSource<'kvs> for DefaultVisitSource<'a> {
impl<'kvs> VisitSource<'kvs> for DefaultVisitSource<'_> {
fn visit_pair(&mut self, key: Key<'_>, value: Value<'kvs>) -> Result<(), Error> {
write!(self.0, " {}={}", self.style_key(key), value)?;
Ok(())
Expand Down
4 changes: 2 additions & 2 deletions src/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ struct DefaultFormat<'a> {
kv_format: &'a KvFormatFn,
}

impl<'a> DefaultFormat<'a> {
impl DefaultFormat<'_> {
fn write(mut self, record: &Record<'_>) -> io::Result<()> {
self.write_timestamp()?;
self.write_level(record)?;
Expand Down Expand Up @@ -454,7 +454,7 @@ impl<'a> DefaultFormat<'a> {
indent_count: usize,
}

impl<'a, 'b> Write for IndentWrapper<'a, 'b> {
impl Write for IndentWrapper<'_, '_> {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
let mut first = true;
for chunk in buf.split(|&x| x == b'\n') {
Expand Down
2 changes: 1 addition & 1 deletion src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ where
}
}

impl<'a> Default for Env<'a> {
impl Default for Env<'_> {
fn default() -> Self {
Env {
filter: Var::new(DEFAULT_FILTER_ENV),
Expand Down

0 comments on commit 240cd21

Please sign in to comment.