We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3505b05 commit cc7fcafCopy full SHA for cc7fcaf
src/cargo/util/toml/mod.rs
@@ -1910,15 +1910,14 @@ fn to_dependency_source_id<P: ResolveToPath + Clone>(
1910
Only one of `registry` or `registry-index` is allowed.",
1911
name_in_toml
1912
),
1913
- (Some(git), maybe_path, _, _) => {
1914
- if maybe_path.is_some() {
1915
- bail!(
1916
- "dependency ({}) specification is ambiguous. \
1917
- Only one of `git` or `path` is allowed.",
1918
- name_in_toml
1919
- );
1920
- }
1921
-
+ (Some(_git), Some(_path), _, _) => {
+ bail!(
+ "dependency ({}) specification is ambiguous. \
+ Only one of `git` or `path` is allowed.",
+ name_in_toml
+ );
+ }
+ (Some(git), None, _, _) => {
1922
let n_details = [&orig.branch, &orig.tag, &orig.rev]
1923
.iter()
1924
.filter(|d| d.is_some())
0 commit comments