@@ -8,7 +8,7 @@ use crate::Error;
88
99/// Python package metadata
1010#[ cfg_attr( feature = "serde" , derive( Deserialize , Serialize ) ) ]
11- #[ derive( Debug , Clone , Default , PartialEq ) ]
11+ #[ derive( Debug , Clone , Default , PartialEq , Eq ) ]
1212pub struct Metadata {
1313 /// Version of the file format; legal values are `1.0`, `1.1`, `1.2`, `2.1` and `2.2`.
1414 pub metadata_version : String ,
@@ -108,13 +108,13 @@ impl Metadata {
108108 } ;
109109 let metadata_version = headers
110110 . get_first_value ( "Metadata-Version" )
111- . ok_or_else ( || Error :: FieldNotFound ( "Metadata-Version" ) ) ?;
111+ . ok_or ( Error :: FieldNotFound ( "Metadata-Version" ) ) ?;
112112 let name = headers
113113 . get_first_value ( "Name" )
114- . ok_or_else ( || Error :: FieldNotFound ( "Name" ) ) ?;
114+ . ok_or ( Error :: FieldNotFound ( "Name" ) ) ?;
115115 let version = headers
116116 . get_first_value ( "Version" )
117- . ok_or_else ( || Error :: FieldNotFound ( "Version" ) ) ?;
117+ . ok_or ( Error :: FieldNotFound ( "Version" ) ) ?;
118118 let platforms = get_all_values ( "Platform" ) ;
119119 let supported_platforms = get_all_values ( "Supported-Platform" ) ;
120120 let summary = get_first_value ( "Summary" ) ;
0 commit comments