diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-07-10 19:13:33 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-07-10 19:17:36 -0400 |
commit | ca44215ac6bff9ca1ac2497247ac2286e630bde5 (patch) | |
tree | b57b2d419f7ef4c248b7a84cbe8cfbfc70038d3c /src/options | |
parent | 6773d019f17378dbc00848ab591fa6279836b3f4 (diff) |
Refactor: return Vec instead of String
Diffstat (limited to 'src/options')
-rw-r--r-- | src/options/set.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/options/set.rs b/src/options/set.rs index b2081fc8..d06d70fa 100644 --- a/src/options/set.rs +++ b/src/options/set.rs @@ -78,7 +78,9 @@ pub fn set_options( let builtin_features = features::make_builtin_features(); // Set features - opt.features = gather_features(opt, &builtin_features, git_config); + let features = gather_features(opt, &builtin_features, git_config); + opt.features = features.join(" "); + // Handle options which default to an arbitrary git config value. // TODO: incorporate this logic into the set_options macro. @@ -236,7 +238,7 @@ fn gather_features<'a>( opt: &cli::Opt, builtin_features: &HashMap<String, features::BuiltinFeature>, git_config: &Option<git_config::GitConfig>, -) -> String { +) -> Vec<String> { let mut features = VecDeque::new(); // Gather features from command line. @@ -301,7 +303,7 @@ fn gather_features<'a>( ); } - Vec::<String>::from(features).join(" ") + Vec::<String>::from(features) } /// Add to feature list `features` all features in the tree rooted at `feature`. |