@@ -106,8 +106,8 @@ impl TomlManifest {
106106 self . features . as_ref ( )
107107 }
108108
109- pub fn resolved_lints ( & self ) -> Result < Option < & TomlLints > , UnresolvedError > {
110- self . lints . as_ref ( ) . map ( |l| l. resolved ( ) ) . transpose ( )
109+ pub fn normalized_lints ( & self ) -> Result < Option < & TomlLints > , UnresolvedError > {
110+ self . lints . as_ref ( ) . map ( |l| l. normalized ( ) ) . transpose ( )
111111 }
112112}
113113
@@ -237,23 +237,26 @@ impl TomlPackage {
237237 }
238238 }
239239
240- pub fn resolved_edition ( & self ) -> Result < Option < & String > , UnresolvedError > {
241- self . edition . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
240+ pub fn normalized_edition ( & self ) -> Result < Option < & String > , UnresolvedError > {
241+ self . edition . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
242242 }
243243
244- pub fn resolved_rust_version ( & self ) -> Result < Option < & RustVersion > , UnresolvedError > {
245- self . rust_version . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
244+ pub fn normalized_rust_version ( & self ) -> Result < Option < & RustVersion > , UnresolvedError > {
245+ self . rust_version
246+ . as_ref ( )
247+ . map ( |v| v. normalized ( ) )
248+ . transpose ( )
246249 }
247250
248- pub fn resolved_version ( & self ) -> Result < Option < & semver:: Version > , UnresolvedError > {
249- self . version . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
251+ pub fn normalized_version ( & self ) -> Result < Option < & semver:: Version > , UnresolvedError > {
252+ self . version . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
250253 }
251254
252- pub fn resolved_authors ( & self ) -> Result < Option < & Vec < String > > , UnresolvedError > {
253- self . authors . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
255+ pub fn normalized_authors ( & self ) -> Result < Option < & Vec < String > > , UnresolvedError > {
256+ self . authors . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
254257 }
255258
256- pub fn resolved_build ( & self ) -> Result < Option < & String > , UnresolvedError > {
259+ pub fn normalized_build ( & self ) -> Result < Option < & String > , UnresolvedError > {
257260 let readme = self . build . as_ref ( ) . ok_or ( UnresolvedError ) ?;
258261 match readme {
259262 StringOrBool :: Bool ( false ) => Ok ( None ) ,
@@ -262,60 +265,66 @@ impl TomlPackage {
262265 }
263266 }
264267
265- pub fn resolved_exclude ( & self ) -> Result < Option < & Vec < String > > , UnresolvedError > {
266- self . exclude . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
268+ pub fn normalized_exclude ( & self ) -> Result < Option < & Vec < String > > , UnresolvedError > {
269+ self . exclude . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
267270 }
268271
269- pub fn resolved_include ( & self ) -> Result < Option < & Vec < String > > , UnresolvedError > {
270- self . include . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
272+ pub fn normalized_include ( & self ) -> Result < Option < & Vec < String > > , UnresolvedError > {
273+ self . include . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
271274 }
272275
273- pub fn resolved_publish ( & self ) -> Result < Option < & VecStringOrBool > , UnresolvedError > {
274- self . publish . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
276+ pub fn normalized_publish ( & self ) -> Result < Option < & VecStringOrBool > , UnresolvedError > {
277+ self . publish . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
275278 }
276279
277- pub fn resolved_description ( & self ) -> Result < Option < & String > , UnresolvedError > {
278- self . description . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
280+ pub fn normalized_description ( & self ) -> Result < Option < & String > , UnresolvedError > {
281+ self . description
282+ . as_ref ( )
283+ . map ( |v| v. normalized ( ) )
284+ . transpose ( )
279285 }
280286
281- pub fn resolved_homepage ( & self ) -> Result < Option < & String > , UnresolvedError > {
282- self . homepage . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
287+ pub fn normalized_homepage ( & self ) -> Result < Option < & String > , UnresolvedError > {
288+ self . homepage . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
283289 }
284290
285- pub fn resolved_documentation ( & self ) -> Result < Option < & String > , UnresolvedError > {
291+ pub fn normalized_documentation ( & self ) -> Result < Option < & String > , UnresolvedError > {
286292 self . documentation
287293 . as_ref ( )
288- . map ( |v| v. resolved ( ) )
294+ . map ( |v| v. normalized ( ) )
289295 . transpose ( )
290296 }
291297
292- pub fn resolved_readme ( & self ) -> Result < Option < & String > , UnresolvedError > {
298+ pub fn normalized_readme ( & self ) -> Result < Option < & String > , UnresolvedError > {
293299 let readme = self . readme . as_ref ( ) . ok_or ( UnresolvedError ) ?;
294- readme. resolved ( ) . and_then ( |sb| match sb {
300+ readme. normalized ( ) . and_then ( |sb| match sb {
295301 StringOrBool :: Bool ( false ) => Ok ( None ) ,
296302 StringOrBool :: Bool ( true ) => Err ( UnresolvedError ) ,
297303 StringOrBool :: String ( value) => Ok ( Some ( value) ) ,
298304 } )
299305 }
300306
301- pub fn resolved_keywords ( & self ) -> Result < Option < & Vec < String > > , UnresolvedError > {
302- self . keywords . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
307+ pub fn normalized_keywords ( & self ) -> Result < Option < & Vec < String > > , UnresolvedError > {
308+ self . keywords . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
303309 }
304310
305- pub fn resolved_categories ( & self ) -> Result < Option < & Vec < String > > , UnresolvedError > {
306- self . categories . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
311+ pub fn normalized_categories ( & self ) -> Result < Option < & Vec < String > > , UnresolvedError > {
312+ self . categories . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
307313 }
308314
309- pub fn resolved_license ( & self ) -> Result < Option < & String > , UnresolvedError > {
310- self . license . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
315+ pub fn normalized_license ( & self ) -> Result < Option < & String > , UnresolvedError > {
316+ self . license . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
311317 }
312318
313- pub fn resolved_license_file ( & self ) -> Result < Option < & String > , UnresolvedError > {
314- self . license_file . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
319+ pub fn normalized_license_file ( & self ) -> Result < Option < & String > , UnresolvedError > {
320+ self . license_file
321+ . as_ref ( )
322+ . map ( |v| v. normalized ( ) )
323+ . transpose ( )
315324 }
316325
317- pub fn resolved_repository ( & self ) -> Result < Option < & String > , UnresolvedError > {
318- self . repository . as_ref ( ) . map ( |v| v. resolved ( ) ) . transpose ( )
326+ pub fn normalized_repository ( & self ) -> Result < Option < & String > , UnresolvedError > {
327+ self . repository . as_ref ( ) . map ( |v| v. normalized ( ) ) . transpose ( )
319328 }
320329}
321330
@@ -330,7 +339,7 @@ pub enum InheritableField<T> {
330339}
331340
332341impl < T > InheritableField < T > {
333- pub fn resolved ( & self ) -> Result < & T , UnresolvedError > {
342+ pub fn normalized ( & self ) -> Result < & T , UnresolvedError > {
334343 self . as_value ( ) . ok_or ( UnresolvedError )
335344 }
336345
@@ -634,7 +643,7 @@ impl InheritableDependency {
634643 }
635644 }
636645
637- pub fn resolved ( & self ) -> Result < & TomlDependency , UnresolvedError > {
646+ pub fn normalized ( & self ) -> Result < & TomlDependency , UnresolvedError > {
638647 match self {
639648 InheritableDependency :: Value ( d) => Ok ( d) ,
640649 InheritableDependency :: Inherit ( _) => Err ( UnresolvedError ) ,
@@ -1440,7 +1449,7 @@ pub struct InheritableLints {
14401449}
14411450
14421451impl InheritableLints {
1443- pub fn resolved ( & self ) -> Result < & TomlLints , UnresolvedError > {
1452+ pub fn normalized ( & self ) -> Result < & TomlLints , UnresolvedError > {
14441453 if self . workspace {
14451454 Err ( UnresolvedError )
14461455 } else {
0 commit comments