@@ -8,7 +8,7 @@ use crate::Error;
8
8
9
9
/// Python package metadata
10
10
#[ cfg_attr( feature = "serde" , derive( Deserialize , Serialize ) ) ]
11
- #[ derive( Debug , Clone , Default , PartialEq ) ]
11
+ #[ derive( Debug , Clone , Default , PartialEq , Eq ) ]
12
12
pub struct Metadata {
13
13
/// Version of the file format; legal values are `1.0`, `1.1`, `1.2`, `2.1` and `2.2`.
14
14
pub metadata_version : String ,
@@ -108,13 +108,13 @@ impl Metadata {
108
108
} ;
109
109
let metadata_version = headers
110
110
. get_first_value ( "Metadata-Version" )
111
- . ok_or_else ( || Error :: FieldNotFound ( "Metadata-Version" ) ) ?;
111
+ . ok_or ( Error :: FieldNotFound ( "Metadata-Version" ) ) ?;
112
112
let name = headers
113
113
. get_first_value ( "Name" )
114
- . ok_or_else ( || Error :: FieldNotFound ( "Name" ) ) ?;
114
+ . ok_or ( Error :: FieldNotFound ( "Name" ) ) ?;
115
115
let version = headers
116
116
. get_first_value ( "Version" )
117
- . ok_or_else ( || Error :: FieldNotFound ( "Version" ) ) ?;
117
+ . ok_or ( Error :: FieldNotFound ( "Version" ) ) ?;
118
118
let platforms = get_all_values ( "Platform" ) ;
119
119
let supported_platforms = get_all_values ( "Supported-Platform" ) ;
120
120
let summary = get_first_value ( "Summary" ) ;
0 commit comments