Filter packages only when '-p' was passed

This commit is contained in:
topecongiro 2017-10-29 00:13:37 +09:00
parent 98eb7da0d5
commit 5e30a0183f

View File

@ -261,12 +261,12 @@ fn filter_packages_with_hitlist<'a>(
packages: Vec<Value>,
workspace_hitlist: &'a WorkspaceHitlist,
) -> Result<Vec<Value>, &'a String> {
if *workspace_hitlist == WorkspaceHitlist::All {
let some_hitlist: Option<HashSet<&String>> =
workspace_hitlist.get_some().map(HashSet::from_iter);
if some_hitlist.is_none() {
return Ok(packages);
}
let mut hitlist: HashSet<&String> = workspace_hitlist
.get_some()
.map_or(HashSet::new(), HashSet::from_iter);
let mut hitlist = some_hitlist.unwrap();
let members: Vec<Value> = packages
.into_iter()
.filter(|member| {