From 2c9d5baed81fa0fd71a0a34c425aead36b243e32 Mon Sep 17 00:00:00 2001 From: Arvid Norlander Date: Sat, 27 Jul 2024 10:55:14 +0200 Subject: [PATCH] chore: Rustfmt nightly options --- src/checks.rs | 3 ++- src/lib.rs | 13 +++++++++---- src/tests.rs | 4 +++- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/checks.rs b/src/checks.rs index 2b24cfd..63c6377 100644 --- a/src/checks.rs +++ b/src/checks.rs @@ -1,6 +1,7 @@ //! Standard checks to include for most programs -use crate::{Check, CheckResult}; +use crate::Check; +use crate::CheckResult; /// Provide info on the rust version used to compile the code pub const CHECK_RUSTC_VERSION: Check = Check { diff --git a/src/lib.rs b/src/lib.rs index d26b74a..d78448f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,9 +32,12 @@ pub mod checks; #[cfg(test)] mod tests; -use std::{cmp::max, io::Write}; +use std::cmp::max; +use std::io::Write; -use anstyle::{AnsiColor, Effects, Reset}; +use anstyle::AnsiColor; +use anstyle::Effects; +use anstyle::Reset; use strum::IntoStaticStr; use thiserror::Error; @@ -117,8 +120,10 @@ pub fn summary(output: &mut impl Write, worst_issues_found: CheckResult) -> Resu Reset.render() )?; } else if worst_issues_found >= CheckResult::Warning { - writeln!(output, - "\n{}Warning{}: Warning(s) found, consider investigating (especially if you have issues)", + writeln!( + output, + "\n{}Warning{}: Warning(s) found, consider investigating (especially if you have \ + issues)", AnsiColor::Yellow.render_fg(), Reset.render() )?; diff --git a/src/tests.rs b/src/tests.rs index 740a65b..757442f 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -1,4 +1,6 @@ -use crate::{medic, Check, CheckResult}; +use crate::medic; +use crate::Check; +use crate::CheckResult; use pretty_assertions::assert_eq; #[test]