@@ -10,11 +10,10 @@ use serde::Serialize;
10
10
use url:: Url ;
11
11
12
12
use crate :: core:: interning:: InternedString ;
13
- use crate :: core:: profiles:: Profiles ;
14
13
use crate :: core:: { Dependency , PackageId , PackageIdSpec , SourceId , Summary } ;
15
14
use crate :: core:: { Edition , Feature , Features , WorkspaceConfig } ;
16
15
use crate :: util:: errors:: * ;
17
- use crate :: util:: toml:: TomlManifest ;
16
+ use crate :: util:: toml:: { TomlManifest , TomlProfiles } ;
18
17
use crate :: util:: { short_hash, Config , Filesystem } ;
19
18
20
19
pub enum EitherManifest {
@@ -33,7 +32,7 @@ pub struct Manifest {
33
32
include : Vec < String > ,
34
33
metadata : ManifestMetadata ,
35
34
custom_metadata : Option < toml:: Value > ,
36
- profiles : Profiles ,
35
+ profiles : Option < TomlProfiles > ,
37
36
publish : Option < Vec < String > > ,
38
37
publish_lockfile : bool ,
39
38
replace : Vec < ( PackageIdSpec , Dependency ) > ,
@@ -64,7 +63,7 @@ pub struct VirtualManifest {
64
63
replace : Vec < ( PackageIdSpec , Dependency ) > ,
65
64
patch : HashMap < Url , Vec < Dependency > > ,
66
65
workspace : WorkspaceConfig ,
67
- profiles : Profiles ,
66
+ profiles : Option < TomlProfiles > ,
68
67
warnings : Warnings ,
69
68
features : Features ,
70
69
}
@@ -399,7 +398,7 @@ impl Manifest {
399
398
links : Option < String > ,
400
399
metadata : ManifestMetadata ,
401
400
custom_metadata : Option < toml:: Value > ,
402
- profiles : Profiles ,
401
+ profiles : Option < TomlProfiles > ,
403
402
publish : Option < Vec < String > > ,
404
403
publish_lockfile : bool ,
405
404
replace : Vec < ( PackageIdSpec , Dependency ) > ,
@@ -475,8 +474,8 @@ impl Manifest {
475
474
pub fn warnings ( & self ) -> & Warnings {
476
475
& self . warnings
477
476
}
478
- pub fn profiles ( & self ) -> & Profiles {
479
- & self . profiles
477
+ pub fn profiles ( & self ) -> Option < & TomlProfiles > {
478
+ self . profiles . as_ref ( )
480
479
}
481
480
pub fn publish ( & self ) -> & Option < Vec < String > > {
482
481
& self . publish
@@ -563,7 +562,7 @@ impl VirtualManifest {
563
562
replace : Vec < ( PackageIdSpec , Dependency ) > ,
564
563
patch : HashMap < Url , Vec < Dependency > > ,
565
564
workspace : WorkspaceConfig ,
566
- profiles : Profiles ,
565
+ profiles : Option < TomlProfiles > ,
567
566
features : Features ,
568
567
) -> VirtualManifest {
569
568
VirtualManifest {
@@ -588,8 +587,8 @@ impl VirtualManifest {
588
587
& self . workspace
589
588
}
590
589
591
- pub fn profiles ( & self ) -> & Profiles {
592
- & self . profiles
590
+ pub fn profiles ( & self ) -> Option < & TomlProfiles > {
591
+ self . profiles . as_ref ( )
593
592
}
594
593
595
594
pub fn warnings_mut ( & mut self ) -> & mut Warnings {
0 commit comments