diff --git a/tracing-journald/src/lib.rs b/tracing-journald/src/lib.rs index fc7263086b..10c6f1b974 100644 --- a/tracing-journald/src/lib.rs +++ b/tracing-journald/src/lib.rs @@ -107,7 +107,7 @@ impl Layer { .and_then(|p| p.file_name()) .map(|n| n.to_string_lossy().into_owned()) // If we fail to get the name of the current executable fall back to an empty string. - .unwrap_or_else(String::new), + .unwrap_or_default(), additional_fields: Vec::new(), }; // Check that we can talk to journald, by sending empty payload which journald discards.