From 3aceb79a4ca8be45ac852bd52ba96e21e59b7589 Mon Sep 17 00:00:00 2001 From: Ninjani <48680156+Ninjani@users.noreply.github.com> Date: Sat, 28 Nov 2020 15:15:52 +0100 Subject: [PATCH] style(tests): rustfmt tests From https://github.com/rust-github/template --- tests/cli.rs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/cli.rs b/tests/cli.rs index 848bc5e..a122703 100644 --- a/tests/cli.rs +++ b/tests/cli.rs @@ -239,7 +239,6 @@ async fn tag() -> color_eyre::Result<()> { .tags .contains(&"test_tag4".to_owned())); - // check tags contains space characters are replaced with "__" after `make` thread::sleep(duration); let mut cmd = Command::cargo_bin("gooseberry")?; @@ -265,14 +264,16 @@ async fn tag() -> color_eyre::Result<()> { // scan the tmp folder after `make` let paths = fs::read_dir(temp_dir.path().join("kb").join("book").as_os_str()).unwrap(); - let names = paths.map(|entry| { - let entry = entry.unwrap(); - let entry_path = entry.path(); - let file_name = entry_path.file_name().unwrap(); - let file_name_as_str = file_name.to_str().unwrap(); - let file_name_as_string = String::from(file_name_as_str); - file_name_as_string - }).collect::>(); + let names = paths + .map(|entry| { + let entry = entry.unwrap(); + let entry_path = entry.path(); + let file_name = entry_path.file_name().unwrap(); + let file_name_as_str = file_name.to_str().unwrap(); + let file_name_as_string = String::from(file_name_as_str); + file_name_as_string + }) + .collect::>(); assert!(names .iter() .any(|x| x.find(&"test__tag5.html".to_owned()) != None));