diff options
author | Ryan Geary <rtgnj42@gmail.com> | 2019-10-24 21:05:09 -0400 |
---|---|---|
committer | Ryan Geary <rtgnj42@gmail.com> | 2019-10-24 21:05:09 -0400 |
commit | c729ad3f004eb2313a4dfa206b7103939abeaac4 (patch) | |
tree | b828c40e74ff2f05d2d5680462ff96de1f0a2fbf | |
parent | f662219407e21abfb658b73a1e97ea0dc3908fe3 (diff) |
RustFmt
-rw-r--r-- | src/choice.rs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/choice.rs b/src/choice.rs index 2fb0974..62477c1 100644 --- a/src/choice.rs +++ b/src/choice.rs @@ -79,13 +79,12 @@ impl Choice { }, }; - if self.is_reverse_range() { - slices.reverse(); - } - - return slices; + if self.is_reverse_range() { + slices.reverse(); + } -} + return slices; + } } #[cfg(test)] @@ -155,7 +154,7 @@ mod tests { #[test] fn print_1_to_3() { - let config = Config::from_iter(vec!["choose", "1:3" ]); + let config = Config::from_iter(vec!["choose", "1:3"]); assert_eq!( vec!["is", "pretty", "cool"], config.opt.choice[0] @@ -222,10 +221,8 @@ mod tests { let config = Config::from_iter(vec!["choose", "3:1"]); assert_eq!( vec!["pretty", "is", "lang"], - config.opt.choice[0].get_choice_slice( - &String::from("rust lang is pretty darn cool"), - &config - ) + config.opt.choice[0] + .get_choice_slice(&String::from("rust lang is pretty darn cool"), &config) ); } |