mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 21:35:00 +00:00
Rename DistInfoMetadata
to CoreMetadata
(#3699)
## Summary This reflects the change codified in PEP 714.
This commit is contained in:
parent
fee344db6f
commit
cf997080b0
3 changed files with 11 additions and 11 deletions
|
@ -39,9 +39,9 @@ fn sorted_simple_json_files<'de, D: Deserializer<'de>>(d: D) -> Result<Vec<File>
|
|||
pub struct File {
|
||||
// PEP 714-renamed field, followed by PEP 691-compliant field, followed by non-PEP 691-compliant
|
||||
// alias used by PyPI.
|
||||
pub core_metadata: Option<DistInfoMetadata>,
|
||||
pub dist_info_metadata: Option<DistInfoMetadata>,
|
||||
pub data_dist_info_metadata: Option<DistInfoMetadata>,
|
||||
pub core_metadata: Option<CoreMetadata>,
|
||||
pub dist_info_metadata: Option<CoreMetadata>,
|
||||
pub data_dist_info_metadata: Option<CoreMetadata>,
|
||||
pub filename: String,
|
||||
pub hashes: Hashes,
|
||||
/// There are a number of invalid specifiers on PyPI, so we first try to parse it into a
|
||||
|
@ -73,12 +73,12 @@ where
|
|||
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum DistInfoMetadata {
|
||||
pub enum CoreMetadata {
|
||||
Bool(bool),
|
||||
Hashes(Hashes),
|
||||
}
|
||||
|
||||
impl DistInfoMetadata {
|
||||
impl CoreMetadata {
|
||||
pub fn is_available(&self) -> bool {
|
||||
match self {
|
||||
Self::Bool(is_available) => *is_available,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue