File tree 1 file changed +10
-12
lines changed
1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -244,18 +244,16 @@ impl Library {
244
244
let mut year = None ;
245
245
let mut minor = None ;
246
246
let mut update = None ;
247
- for line in f. lines ( ) {
248
- if let Ok ( line) = line {
249
- if !line. starts_with ( "#define" ) {
250
- continue ;
251
- }
252
- let ss: Vec < & str > = line. split ( ' ' ) . collect ( ) ;
253
- match ss[ 1 ] {
254
- "__INTEL_MKL__" => year = Some ( ss[ 2 ] . parse ( ) ?) ,
255
- "__INTEL_MKL_MINOR__" => minor = Some ( ss[ 2 ] . parse ( ) ?) ,
256
- "__INTEL_MKL_UPDATE__" => update = Some ( ss[ 2 ] . parse ( ) ?) ,
257
- _ => continue ,
258
- }
247
+ for line in f. lines ( ) . flatten ( ) {
248
+ if !line. starts_with ( "#define" ) {
249
+ continue ;
250
+ }
251
+ let ss: Vec < & str > = line. split ( ' ' ) . collect ( ) ;
252
+ match ss[ 1 ] {
253
+ "__INTEL_MKL__" => year = Some ( ss[ 2 ] . parse ( ) ?) ,
254
+ "__INTEL_MKL_MINOR__" => minor = Some ( ss[ 2 ] . parse ( ) ?) ,
255
+ "__INTEL_MKL_UPDATE__" => update = Some ( ss[ 2 ] . parse ( ) ?) ,
256
+ _ => continue ,
259
257
}
260
258
}
261
259
match ( year, minor, update) {
You can’t perform that action at this time.
0 commit comments