Update toml tests with LogEncoder structs
The tests used to compare Strings now it compares two &str. No change in
functionality just in types.
@@ -461,7 +461,7 @@ impl From<ScabbardStateToml> for ScabbardState {
#[cfg(test)]
mod tests {
- use crate::config::LoggerConfig;
+ use crate::config::{LogEncoder, LoggerConfig};
use super::*;
@@ -886,7 +886,7 @@ mod tests {
assert!(matches!(stdout.kind, crate::config::RawLogTarget::Stdout));
assert!(stdout.size.is_none());
assert!(stdout.filename.is_none());
- assert_eq!(stdout.encoder, default_pattern());
+ assert_eq!(&*stdout.encoder, &*LogEncoder::default());
assert!(appenders.contains_key("rolling_file"));
assert!(appenders.get("rolling_file").is_some());
@@ -902,7 +902,7 @@ mod tests {
rolling_file.filename.as_ref().unwrap(),
"/var/log/splinter/splinterd.log"
);
- assert_eq!(rolling_file.encoder, default_pattern());
+ assert_eq!(&*rolling_file.encoder, &*LogEncoder::default());
let loggers = toml.loggers();
assert!(loggers.is_some());
