Skip to content

Commit

Permalink
fix - remove unwrap
Browse files Browse the repository at this point in the history
  • Loading branch information
hjr3 committed May 10, 2017
1 parent 9817033 commit ea2df45
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cargo/core/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,10 @@ impl<'cfg> Workspace<'cfg> {
}

fn expand_member_path(path: &Path) -> CargoResult<Vec<PathBuf>> {
let path = path.to_str().unwrap();
let path = match path.to_str() {
Some(p) => p,
None => return Ok(Vec::new()),
};
let res = glob(path).map_err(|e| {
human(format!("could not parse pattern `{}`: {}", &path, e))
})?;
Expand Down

0 comments on commit ea2df45

Please sign in to comment.