Skip to content
Snippets Groups Projects
Commit 02c5cb3f authored by Jorge Aparicio's avatar Jorge Aparicio
Browse files

fix default path name check

parent 631e4b04
No related branches found
No related tags found
No related merge requests found
......@@ -99,7 +99,7 @@ fn init(init: Option<::Init>) -> Result<Init> {
fn path(default: &str, path: Option<Path>) -> Result<Path> {
Ok(if let Some(path) = path {
ensure!(
path.segments.len() == 1 &&
path.segments.len() != 1 ||
path.segments[0].ident.as_ref() != default,
"this is the default value. It should be omitted."
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment