From 7b63cfbf383d3939254a4e459b9c5326d618c0ca Mon Sep 17 00:00:00 2001 From: Joxit Date: Thu, 15 Oct 2020 20:14:53 +0200 Subject: [PATCH] build: release 0.2.0 --- Cargo.toml | 2 +- src/fst/dot.rs | 7 +++++-- src/utils/mod.rs | 2 +- src/utils/traits/command_config.rs | 7 +++++-- src/utils/traits/mod.rs | 2 +- tests/config.rs | 5 ++++- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0c4d415..de198af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "runtasktic" -version = "0.1.0" +version = "0.2.0" authors = ["Jones Magloire @Joxit"] description = "Command-line task management tool for execution of regular long sequential or parallel tasks." edition = "2018" diff --git a/src/fst/dot.rs b/src/fst/dot.rs index 7bb6538..10cef16 100644 --- a/src/fst/dot.rs +++ b/src/fst/dot.rs @@ -80,7 +80,9 @@ mod test { assert!(super::dot_write_file(&fst, &mut result).is_ok()); let result = std::str::from_utf8(&result).unwrap(); println!("{}", result); - assert_eq!(result, r#"digraph { + assert_eq!( + result, + r#"digraph { a[label="\"a\"" shape=doublecircle] a -> b_a_ba a -> c @@ -92,6 +94,7 @@ mod test { c -> ds ds[label="d%s" shape=circle] } -"#); +"# + ); } } diff --git a/src/utils/mod.rs b/src/utils/mod.rs index d36fc60..f6ac8fc 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -1 +1 @@ -pub mod traits; \ No newline at end of file +pub mod traits; diff --git a/src/utils/traits/command_config.rs b/src/utils/traits/command_config.rs index 6aac5b4..cfd2b40 100644 --- a/src/utils/traits/command_config.rs +++ b/src/utils/traits/command_config.rs @@ -1,6 +1,6 @@ use std::fs::OpenOptions; -use std::process::{Command, Stdio}; use std::path::Path; +use std::process::{Command, Stdio}; pub trait CommandConfig { fn working_dir(&mut self, dir: &Option) -> Result<&mut Self, String>; @@ -14,7 +14,10 @@ impl CommandConfig for Command { if Path::new(d).is_dir() { Ok(self.current_dir(d)) } else { - Err(format!("Invalid working directory: `{}` is not a directory", d)) + Err(format!( + "Invalid working directory: `{}` is not a directory", + d + )) } } else { Ok(self) diff --git a/src/utils/traits/mod.rs b/src/utils/traits/mod.rs index cc0e4ec..0ca14b6 100644 --- a/src/utils/traits/mod.rs +++ b/src/utils/traits/mod.rs @@ -1,3 +1,3 @@ pub(crate) use command_config::CommandConfig; -mod command_config; \ No newline at end of file +mod command_config; diff --git a/tests/config.rs b/tests/config.rs index 26481a2..7daaf94 100644 --- a/tests/config.rs +++ b/tests/config.rs @@ -25,7 +25,10 @@ fn sample_yaml() { assert_eq!(*config.notification(), None); assert_eq!(config.concurrency(), -1); - assert_eq!(*config.working_dir(), Some(String::from("/custom/directory"))); + assert_eq!( + *config.working_dir(), + Some(String::from("/custom/directory")) + ); assert_eq!(*config.stdout(), Some(String::from("none"))); assert_eq!(*config.stderr(), Some(String::from("none"))); assert_eq!(config.tasks().len(), 4);