@@ -55,7 +55,7 @@ pub struct AddOptions<'a> {
55
55
/// Act as if dependencies will be added
56
56
pub dry_run : bool ,
57
57
/// Whether the minimum supported Rust version should be considered during resolution
58
- pub honor_rust_version : bool ,
58
+ pub honor_rust_version : Option < bool > ,
59
59
}
60
60
61
61
/// Add dependencies to a manifest
@@ -288,7 +288,7 @@ fn resolve_dependency(
288
288
ws : & Workspace < ' _ > ,
289
289
spec : & Package ,
290
290
section : & DepTable ,
291
- honor_rust_version : bool ,
291
+ honor_rust_version : Option < bool > ,
292
292
gctx : & GlobalContext ,
293
293
registry : & mut PackageRegistry < ' _ > ,
294
294
) -> CargoResult < DependencyUI > {
@@ -571,7 +571,7 @@ fn get_existing_dependency(
571
571
fn get_latest_dependency (
572
572
spec : & Package ,
573
573
dependency : & Dependency ,
574
- honor_rust_version : bool ,
574
+ honor_rust_version : Option < bool > ,
575
575
gctx : & GlobalContext ,
576
576
registry : & mut PackageRegistry < ' _ > ,
577
577
) -> CargoResult < Dependency > {
@@ -608,7 +608,7 @@ fn get_latest_dependency(
608
608
)
609
609
} ) ?;
610
610
611
- if honor_rust_version {
611
+ if honor_rust_version. unwrap_or ( true ) {
612
612
let ( req_msrv, is_msrv) = spec
613
613
. rust_version ( )
614
614
. cloned ( )
0 commit comments