File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -139,24 +139,6 @@ mod tests {
139139 path:: { Path , PathBuf } ,
140140 } ;
141141
142- #[ cfg( feature = "from_metadata" ) ]
143- fn load_metadata ( cargo_toml_path : & Path ) -> cargo_metadata:: Metadata {
144- let mut cmd = cargo_metadata:: MetadataCommand :: new ( ) ;
145- cmd. manifest_path ( cargo_toml_path) ;
146- cmd. exec ( ) . unwrap ( )
147- }
148-
149- #[ test]
150- #[ cfg( feature = "from_metadata" ) ]
151- fn dependency_cycle ( ) {
152- let cargo_toml_path = PathBuf :: from ( std:: env:: var ( "CARGO_MANIFEST_DIR" ) . unwrap ( ) )
153- . join ( "tests/fixtures/cargo-audit-dep-cycle/Cargo.toml" ) ;
154- let metadata = load_metadata ( & cargo_toml_path) ;
155- let version_info_struct: VersionInfo = ( & metadata) . try_into ( ) . unwrap ( ) ;
156- let json = serde_json:: to_string ( & version_info_struct) . unwrap ( ) ;
157- VersionInfo :: from_str ( & json) . unwrap ( ) ; // <- the part we care about succeeding
158- }
159-
160142 #[ cfg( feature = "schema" ) ]
161143 /// Generate a JsonSchema for VersionInfo
162144 fn generate_schema ( ) -> schemars:: schema:: RootSchema {
You can’t perform that action at this time.
0 commit comments