@@ -59,7 +59,7 @@ impl<'a> Prepare<'a> {
5959 }
6060
6161 let res = Command :: new ( self . workspace , self . toolchain . cargo ( ) )
62- . args ( & [ "read-manifest " , "--manifest-path" , "Cargo.toml" ] )
62+ . args ( & [ "metadata " , "--manifest-path" , "Cargo.toml" , "--no-deps "] )
6363 . cd ( self . source_dir )
6464 . log_output ( false )
6565 . run ( ) ;
@@ -196,7 +196,7 @@ impl<'a> TomlTweaker<'a> {
196196
197197 self . remove_missing_items ( "example" ) ;
198198 self . remove_missing_items ( "test" ) ;
199- self . remove_workspaces ( ) ;
199+ self . remove_parent_workspaces ( ) ;
200200 self . remove_unwanted_cargo_features ( ) ;
201201 self . remove_dependencies ( ) ;
202202 self . apply_patches ( ) ;
@@ -237,13 +237,9 @@ impl<'a> TomlTweaker<'a> {
237237 }
238238 }
239239
240- fn remove_workspaces ( & mut self ) {
240+ fn remove_parent_workspaces ( & mut self ) {
241241 let krate = self . krate . to_string ( ) ;
242242
243- if self . table . remove ( "workspace" ) . is_some ( ) {
244- info ! ( "removed workspace from {}" , krate) ;
245- }
246-
247243 // Eliminate parent workspaces
248244 if let Some ( & mut Value :: Table ( ref mut package) ) = self . table . get_mut ( "package" ) {
249245 if package. remove ( "workspace" ) . is_some ( ) {
@@ -467,6 +463,9 @@ mod tests {
467463
468464 [ target. "cfg(unix)" . dependencies]
469465 quux = { version = "1.0" }
466+
467+ [ workspace]
468+ members = [ ]
470469 } ;
471470
472471 let krate = Crate :: local ( "/dev/null" . as_ref ( ) ) ;
0 commit comments