File tree Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Expand file tree Collapse file tree 1 file changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -100,21 +100,11 @@ pub(crate) fn build_dependencies(config: &Config) -> Result<Dependencies> {
100
100
continue ;
101
101
} ;
102
102
if let cargo_metadata:: Message :: CompilerArtifact ( artifact) = message {
103
- if artifact
104
- . filenames
105
- . iter ( )
106
- . any ( |f| f. ends_with ( "build-script-build" ) )
107
- {
108
- continue ;
109
- }
110
- // Check that we only collect rmeta and rlib crates, not build script crates
111
- if artifact. filenames . iter ( ) . any ( |f| {
112
- !matches ! (
113
- f. extension( ) ,
114
- Some ( "rlib" | "rmeta" | "so" | "dylib" | "dll" )
115
- )
116
- } ) {
117
- continue ;
103
+ for ctype in artifact. target . crate_types {
104
+ match ctype. as_str ( ) {
105
+ "proc-macro" | "lib" => { }
106
+ _ => continue ,
107
+ }
118
108
}
119
109
for filename in & artifact. filenames {
120
110
import_paths. insert ( filename. parent ( ) . unwrap ( ) . into ( ) ) ;
You can’t perform that action at this time.
0 commit comments