File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -226,14 +226,14 @@ impl Library {
226
226
let mut cargo_metadata = Vec :: with_capacity ( 64 ) ;
227
227
let include_paths: Vec < _ > = include_paths. iter ( ) . map ( PathBuf :: from) . collect ( ) ;
228
228
229
- let version = Self :: version_from_include_paths ( & include_paths) ;
229
+ let version = Self :: version_from_include_paths ( & include_paths) . ok_or ( "could not get versions from header files" ) ? ;
230
230
231
231
cargo_metadata. extend ( Self :: process_link_paths ( Some ( link_paths) , vec ! [ ] , None ) ) ;
232
232
cargo_metadata. extend ( Self :: process_link_libs ( Some ( link_libs) , vec ! [ ] , None ) ) ;
233
233
234
234
Ok ( Self {
235
235
include_paths,
236
- version : version . unwrap_or_else ( || Version :: new ( 0 , 0 , 0 ) ) ,
236
+ version,
237
237
cargo_metadata,
238
238
} )
239
239
} else {
You can’t perform that action at this time.
0 commit comments