@@ -47,7 +47,7 @@ pub fn read_manifest(
4747 path : & Path ,
4848 source_id : SourceId ,
4949 gctx : & GlobalContext ,
50- ) -> CargoResult < ( EitherManifest , Vec < PathBuf > ) > {
50+ ) -> CargoResult < EitherManifest > {
5151 let contents =
5252 read_toml_string ( path, gctx) . map_err ( |err| ManifestError :: new ( err, path. into ( ) ) ) ?;
5353 let document =
@@ -174,13 +174,13 @@ fn convert_toml(
174174 manifest_file : & Path ,
175175 source_id : SourceId ,
176176 gctx : & GlobalContext ,
177- ) -> CargoResult < ( EitherManifest , Vec < PathBuf > ) > {
177+ ) -> CargoResult < EitherManifest > {
178178 return if manifest. package ( ) . is_some ( ) {
179- let ( manifest, paths ) = to_real_manifest ( manifest, source_id, manifest_file, gctx) ?;
180- Ok ( ( EitherManifest :: Real ( manifest) , paths ) )
179+ let manifest = to_real_manifest ( manifest, source_id, manifest_file, gctx) ?;
180+ Ok ( EitherManifest :: Real ( manifest) )
181181 } else {
182- let ( m , paths ) = to_virtual_manifest ( manifest, source_id, manifest_file, gctx) ?;
183- Ok ( ( EitherManifest :: Virtual ( m ) , paths ) )
182+ let manifest = to_virtual_manifest ( manifest, source_id, manifest_file, gctx) ?;
183+ Ok ( EitherManifest :: Virtual ( manifest ) )
184184 } ;
185185}
186186
@@ -464,7 +464,7 @@ pub fn to_real_manifest(
464464 source_id : SourceId ,
465465 manifest_file : & Path ,
466466 gctx : & GlobalContext ,
467- ) -> CargoResult < ( Manifest , Vec < PathBuf > ) > {
467+ ) -> CargoResult < Manifest > {
468468 fn get_ws (
469469 gctx : & GlobalContext ,
470470 resolved_path : & Path ,
@@ -516,7 +516,6 @@ pub fn to_real_manifest(
516516 }
517517 }
518518
519- let mut nested_paths = vec ! [ ] ;
520519 let mut warnings = vec ! [ ] ;
521520 let mut errors = vec ! [ ] ;
522521
@@ -770,7 +769,6 @@ pub fn to_real_manifest(
770769 let mut manifest_ctx = ManifestContext {
771770 deps : & mut deps,
772771 source_id,
773- nested_paths : & mut nested_paths,
774772 gctx,
775773 warnings : & mut warnings,
776774 features : & features,
@@ -1272,15 +1270,15 @@ pub fn to_real_manifest(
12721270
12731271 manifest. feature_gate ( ) ?;
12741272
1275- Ok ( ( manifest, nested_paths ) )
1273+ Ok ( manifest)
12761274}
12771275
12781276fn to_virtual_manifest (
12791277 me : manifest:: TomlManifest ,
12801278 source_id : SourceId ,
12811279 manifest_file : & Path ,
12821280 gctx : & GlobalContext ,
1283- ) -> CargoResult < ( VirtualManifest , Vec < PathBuf > ) > {
1281+ ) -> CargoResult < VirtualManifest > {
12841282 let root = manifest_file. parent ( ) . unwrap ( ) ;
12851283
12861284 if let Some ( deps) = me
@@ -1302,7 +1300,6 @@ fn to_virtual_manifest(
13021300 bail ! ( "this virtual manifest specifies a `{field}` section, which is not allowed" ) ;
13031301 }
13041302
1305- let mut nested_paths = Vec :: new ( ) ;
13061303 let mut warnings = Vec :: new ( ) ;
13071304 let mut deps = Vec :: new ( ) ;
13081305 let empty = Vec :: new ( ) ;
@@ -1315,7 +1312,6 @@ fn to_virtual_manifest(
13151312 let mut manifest_ctx = ManifestContext {
13161313 deps : & mut deps,
13171314 source_id,
1318- nested_paths : & mut nested_paths,
13191315 gctx,
13201316 warnings : & mut warnings,
13211317 platform : None ,
@@ -1376,7 +1372,7 @@ fn to_virtual_manifest(
13761372 manifest. warnings_mut ( ) . add_warning ( warning) ;
13771373 }
13781374
1379- Ok ( ( manifest, nested_paths ) )
1375+ Ok ( manifest)
13801376}
13811377
13821378fn replace (
@@ -1467,7 +1463,6 @@ fn patch(
14671463struct ManifestContext < ' a , ' b > {
14681464 deps : & ' a mut Vec < Dependency > ,
14691465 source_id : SourceId ,
1470- nested_paths : & ' a mut Vec < PathBuf > ,
14711466 gctx : & ' b GlobalContext ,
14721467 warnings : & ' a mut Vec < String > ,
14731468 platform : Option < Platform > ,
@@ -1563,7 +1558,7 @@ fn inheritable_from_path(
15631558 } ;
15641559
15651560 let source_id = SourceId :: for_path ( workspace_path_root) ?;
1566- let ( man, _ ) = read_manifest ( & workspace_path, source_id, gctx) ?;
1561+ let man = read_manifest ( & workspace_path, source_id, gctx) ?;
15671562 match man. workspace_config ( ) {
15681563 WorkspaceConfig :: Root ( root) => {
15691564 gctx. ws_roots
@@ -1885,7 +1880,6 @@ pub(crate) fn to_dependency<P: ResolveToPath + Clone>(
18851880 dep : & manifest:: TomlDependency < P > ,
18861881 name : & str ,
18871882 source_id : SourceId ,
1888- nested_paths : & mut Vec < PathBuf > ,
18891883 gctx : & GlobalContext ,
18901884 warnings : & mut Vec < String > ,
18911885 platform : Option < Platform > ,
@@ -1899,7 +1893,6 @@ pub(crate) fn to_dependency<P: ResolveToPath + Clone>(
18991893 & mut ManifestContext {
19001894 deps : & mut Vec :: new ( ) ,
19011895 source_id,
1902- nested_paths,
19031896 gctx,
19041897 warnings,
19051898 platform,
@@ -2068,7 +2061,6 @@ fn detailed_dep_to_dependency<P: ResolveToPath + Clone>(
20682061 }
20692062 ( None , Some ( path) , _, _) => {
20702063 let path = path. resolve ( manifest_ctx. gctx ) ;
2071- manifest_ctx. nested_paths . push ( path. clone ( ) ) ;
20722064 // If the source ID for the package we're parsing is a path
20732065 // source, then we normalize the path here to get rid of
20742066 // components like `..`.
0 commit comments