diff --git a/src/canvas/components/time_series/vendored.rs b/src/canvas/components/time_series/vendored.rs index 93b9e8d6..08121d71 100644 --- a/src/canvas/components/time_series/vendored.rs +++ b/src/canvas/components/time_series/vendored.rs @@ -990,13 +990,7 @@ mod tests { (actual, expected) => { if actual.area != expected.area { panic!( - indoc::indoc!( - " - buffer areas not equal - expected: {:?} - actual: {:?}" - ), - expected, actual + "buffer areas not equal - expected: {expected:?} - actual: {actual:?}", ); } let diff = expected.diff(&actual); diff --git a/src/options.rs b/src/options.rs index 29133c2e..d812b3f5 100644 --- a/src/options.rs +++ b/src/options.rs @@ -235,20 +235,19 @@ pub(crate) fn get_or_create_config(config_path: Option<&Path>) -> anyhow::Result match create_config_at_path(path) { Ok(cfg) => Ok(cfg), Err(err) => { + let path = path.display(); if config_path.is_some() { Err(err.context(format!( - "bottom could not create a new config file at '{}'.", - path.display() + "bottom could not create a new config file at '{path}'.", ))) } else { indoc::eprintdoc!( - "Note: bottom couldn't create a default config file at '{}', and the \ + "Note: bottom couldn't create a default config file at '{path}', and the \ application has fallen back to the default configuration. Caused by: {err} ", - path.display() ); Ok(Config::default()) diff --git a/src/options/args.rs b/src/options/args.rs index aa7de9d7..e0eec54e 100644 --- a/src/options/args.rs +++ b/src/options/args.rs @@ -23,6 +23,7 @@ const TEMPLATE: &str = indoc! { const USAGE: &str = "btm [OPTIONS]"; +// Can't use an unwrap here at the moment since it's const. const VERSION: &str = match option_env!("NIGHTLY_VERSION") { Some(nightly_version) => nightly_version, None => crate_version!(),