11use crate :: args:: Args ;
22use crate :: artifact:: { Artifact , ArtifactType } ;
33use crate :: error:: { Error , Result } ;
4- use crate :: manifest:: Manifest ;
54use crate :: profile:: Profile ;
65use crate :: { utils, CrateType , LocalizedConfig } ;
76use std:: collections:: HashMap ;
@@ -87,8 +86,6 @@ impl Subcommand {
8786 config. set_env_vars ( ) . unwrap ( ) ;
8887 }
8988
90- let parsed_manifest = Manifest :: parse_from_toml ( & manifest_path) ?;
91-
9289 let target_dir = args
9390 . target_dir
9491 . clone ( )
@@ -132,7 +129,7 @@ impl Subcommand {
132129 }
133130
134131 // Add all explicitly configured binaries
135- for bin in & parsed_manifest . bins {
132+ for bin in & manifest . bins {
136133 let path = bin
137134 . path
138135 . clone ( )
@@ -153,7 +150,7 @@ impl Subcommand {
153150 }
154151
155152 // Add all explicitly configured examples
156- for example in & parsed_manifest . examples {
153+ for example in & manifest . examples {
157154 let path = example
158155 . path
159156 . clone ( )
@@ -198,7 +195,7 @@ impl Subcommand {
198195 }
199196
200197 // Parse all autobins
201- if parsed_manifest . package . as_ref ( ) . is_none_or ( |p| p. autobins ) {
198+ if manifest . package . as_ref ( ) . is_none_or ( |p| p. autobins ) {
202199 // Special-case for the main binary of a package
203200 if root_dir. join ( main_bin_path) . is_file ( ) {
204201 insert_if_unconfigured (
@@ -217,19 +214,15 @@ impl Subcommand {
217214 }
218215
219216 // Parse all autoexamples
220- if parsed_manifest
221- . package
222- . as_ref ( )
223- . is_none_or ( |p| p. autoexamples )
224- {
217+ if manifest. package . as_ref ( ) . is_none_or ( |p| p. autoexamples ) {
225218 for file in utils:: list_rust_files ( & root_dir. join ( "examples" ) ) ? {
226219 let file = file. strip_prefix ( root_dir) . unwrap ( ) ;
227220
228221 insert_if_unconfigured ( None , file, ArtifactType :: Example , & mut example_artifacts) ;
229222 }
230223 }
231224
232- let mut lib_artifact = parsed_manifest
225+ let mut lib_artifact = manifest
233226 . lib
234227 . as_ref ( )
235228 . map ( |lib| Artifact {
0 commit comments