cargo::ops::cargo_add

Function check_invalid_ws_keys

Source
fn check_invalid_ws_keys(toml_key: &str, arg: &DepOp) -> CargoResult<()>
Expand description

When { workspace = true } you cannot define other keys that configure the source of the dependency such as version, registry, registry-index, path, git, branch, tag, rev, or package. You can also not define default-features.

Only default-features, registry and rename need to be checked for currently. This is because git and its associated keys, path, and version should all bee checked before this is called. rename is checked for as it turns into package