diff --git a/loco-new/tests/assertion/string.rs b/loco-new/tests/assertion/string.rs index 8f33a9de4..581792b6c 100644 --- a/loco-new/tests/assertion/string.rs +++ b/loco-new/tests/assertion/string.rs @@ -35,8 +35,8 @@ pub fn assert_contains(content: &str, expected: &str) { assert!( content_sanitized.contains(&expected_sanitized), - "Assertion failed: The content did not contain the expected string. \ - Expected: '{expected_sanitized}', content:\n{content_sanitized}" + "Assertion failed: The content did not contain the expected string. Expected: \ + '{expected_sanitized}', content:\n{content_sanitized}" ); } @@ -46,7 +46,7 @@ pub fn assert_not_contains(content: &str, unexpected: &str) { assert!( !content_sanitized.contains(&unexpected_sanitized), - "Assertion failed: The content unexpectedly contained the string. \ - Unexpected: '{unexpected_sanitized}', content:\n{content_sanitized}" + "Assertion failed: The content unexpectedly contained the string. Unexpected: \ + '{unexpected_sanitized}', content:\n{content_sanitized}" ); } diff --git a/loco-new/tests/assertion/yaml.rs b/loco-new/tests/assertion/yaml.rs index ed37c70b8..0beac58da 100644 --- a/loco-new/tests/assertion/yaml.rs +++ b/loco-new/tests/assertion/yaml.rs @@ -77,8 +77,12 @@ pub fn assert_path_value_eq_excluded( ); let mut actual = actual.unwrap().clone(); let actual = remove_value_at_path(&mut actual, excluded); - assert_ne!(actual, Some(expected.clone()), "Assertion failed: Path {path:?} does not match expected value. Expected: {expected:?}, \ - Actual: {actual:?}"); + assert_ne!( + actual, + Some(expected.clone()), + "Assertion failed: Path {path:?} does not match expected value. Expected: {expected:?}, \ + Actual: {actual:?}" + ); } // pub fn assert_path_value_eq_mapping(yml: &Value, path: &[&str], expected: diff --git a/loco-new/tests/wizard/new.rs b/loco-new/tests/wizard/new.rs index c0f5dda23..9119e3e17 100644 --- a/loco-new/tests/wizard/new.rs +++ b/loco-new/tests/wizard/new.rs @@ -1,3 +1,5 @@ +use std::{collections::HashMap, path::PathBuf, process::Output, sync::Arc}; + use duct::cmd; use loco::{ generator::{executer::FileSystem, Generator}, @@ -5,7 +7,6 @@ use loco::{ wizard::{self, AssetsOption, BackgroundOption, DBOption}, OS, }; -use std::{collections::HashMap, path::PathBuf, process::Output, sync::Arc}; #[cfg(feature = "test-wizard")] #[rstest::rstest] diff --git a/src/app.rs b/src/app.rs index e6e6cdec4..abc876bc7 100644 --- a/src/app.rs +++ b/src/app.rs @@ -146,10 +146,11 @@ pub trait Hooks: Send { Ok(false) } - /// Loads the configuration settings for the application based on the given environment. + /// Loads the configuration settings for the application based on the given + /// environment. /// - /// This function is responsible for retrieving the configuration for the application - /// based on the current environment. + /// This function is responsible for retrieving the configuration for the + /// application based on the current environment. async fn load_config(env: &Environment) -> Result { env.load() } diff --git a/src/boot.rs b/src/boot.rs index 23a71335d..f3a68e0b7 100644 --- a/src/boot.rs +++ b/src/boot.rs @@ -15,8 +15,7 @@ use crate::{ app::{AppContext, Hooks}, banner::print_banner, bgworker, cache, - config::Config, - config::{self, WorkerMode}, + config::{self, Config, WorkerMode}, controller::ListRoutes, environment::Environment, errors::Error, diff --git a/src/cli.rs b/src/cli.rs index 1b6f55512..d8740d261 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -330,7 +330,8 @@ After running the migration, follow these steps to complete the process: kind: DeploymentKind, }, - /// Override templates and allows you to take control of them. You can always go back when deleting the local template. + /// Override templates and allows you to take control of them. You can + /// always go back when deleting the local template. #[command(after_help = format!("{} - Override a Specific File: * cargo loco generate override scaffold/api/controller.t diff --git a/src/request_context/driver/cookie.rs b/src/request_context/driver/cookie.rs index b3e167c56..7ed3734c5 100644 --- a/src/request_context/driver/cookie.rs +++ b/src/request_context/driver/cookie.rs @@ -492,7 +492,8 @@ mod test { let same_site = cookie.same_site() == Some(same_site); let path = cookie.path() == Some(config.path.as_str()); let domain = cookie.domain() == config.domain.as_deref(); - let max_age = cookie.max_age() == config.expiry.map(|e| time::Duration::seconds(i64::from(e))); + let max_age = + cookie.max_age() == config.expiry.map(|e| time::Duration::seconds(i64::from(e))); // print out the cookie details if any check failed cookie.name() == config.name