Merge pull request #1965 from topecongiro/issue-1963

Avoid panicking when calling 'cargo fmt --all'
This commit is contained in:
Seiichi Uchida 2017-09-18 00:11:17 +09:00 committed by GitHub
commit 5a97e37de5

View File

@ -248,7 +248,7 @@ fn get_targets(workspace_hitlist: &WorkspaceHitlist) -> Result<Vec<Target>, std:
hitlist.take(&member_name.to_string()).is_some()
})
.collect();
if hitlist.is_empty() {
if !hitlist.is_empty() {
// Mimick cargo of only outputting one <package> spec.
return Err(std::io::Error::new(
std::io::ErrorKind::InvalidInput,