Add `From` for `FlatDistributions` struct (#8800)

Co-authored-by: konsti <konstin@mailbox.org>
This commit is contained in:
Tim de Jager 2024-11-04 09:41:39 +01:00 committed by GitHub
parent a052418dcd
commit ef8724c979
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 0 deletions

View File

@ -226,3 +226,10 @@ impl From<FlatDistributions> for BTreeMap<Version, PrioritizedDist> {
distributions.0 distributions.0
} }
} }
/// For external users.
impl From<BTreeMap<Version, PrioritizedDist>> for FlatDistributions {
fn from(distributions: BTreeMap<Version, PrioritizedDist>) -> Self {
Self(distributions)
}
}