cargo::ops::cargo_add

Function latest_compatible

Source
fn latest_compatible<'s>(
    msrvs: &[(&'s Summary, Option<&RustVersion>)],
    pkg_msrv: &PartialVersion,
) -> Option<&'s Summary>
Expand description

Of MSRV-compatible summaries, find the highest version

Assumptions:

  • msrvs is sorted by version