fn check_rust_version_for_optional_dependency(
    rust_version: Option<&RustVersion>,
) -> CargoResult<bool>
Expand description

When the --optional option is added using cargo add, we need to check the current rust-version. As the dep: syntax is only available starting with Rust 1.60.0

true means that the rust-version is None or the rust-version is higher than the version needed.

Note: Previous versions can only use the implicit feature name.