File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,6 @@ fn rustc_minor_nightly() -> (u32, bool) {
132
132
let output = cmd
133
133
. arg ( "--version" )
134
134
. output ( )
135
- . ok ( )
136
135
. expect ( "Failed to get rustc version" ) ;
137
136
if !output. status . success ( ) {
138
137
panic ! (
@@ -198,7 +197,7 @@ fn emcc_version_code() -> Option<u64> {
198
197
199
198
// Some Emscripten versions come with `-git` attached, so split the
200
199
// version string also on the `-` char.
201
- let mut pieces = version. trim ( ) . split ( |c| c == '.' || c == '-' ) ;
200
+ let mut pieces = version. trim ( ) . split ( [ '.' , '-' ] ) ;
202
201
203
202
let major = pieces. next ( ) . and_then ( |x| x. parse ( ) . ok ( ) ) . unwrap_or ( 0 ) ;
204
203
let minor = pieces. next ( ) . and_then ( |x| x. parse ( ) . ok ( ) ) . unwrap_or ( 0 ) ;
Original file line number Diff line number Diff line change @@ -5508,19 +5508,19 @@ f! {
5508
5508
return :: CMSG_FIRSTHDR ( mhdr) ;
5509
5509
} ;
5510
5510
let cmsg_len = ( * cmsg) . cmsg_len as usize ;
5511
- let next = cmsg as usize + __DARWIN_ALIGN32( cmsg_len as usize ) ;
5511
+ let next = cmsg as usize + __DARWIN_ALIGN32( cmsg_len) ;
5512
5512
let max = ( * mhdr) . msg_control as usize
5513
5513
+ ( * mhdr) . msg_controllen as usize ;
5514
5514
if next + __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) > max {
5515
- 0 as * mut :: cmsghdr
5515
+ core :: ptr :: null_mut ( )
5516
5516
} else {
5517
5517
next as * mut :: cmsghdr
5518
5518
}
5519
5519
}
5520
5520
5521
5521
pub fn CMSG_DATA ( cmsg: * const :: cmsghdr) -> * mut :: c_uchar {
5522
5522
( cmsg as * mut :: c_uchar)
5523
- . offset ( __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) as isize )
5523
+ . add ( __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) )
5524
5524
}
5525
5525
5526
5526
pub { const } fn CMSG_SPACE ( length: :: c_uint) -> :: c_uint {
Original file line number Diff line number Diff line change 546
546
if ( * mhdr) . msg_controllen as usize >= :: mem:: size_of:: <:: cmsghdr>( ) {
547
547
( * mhdr) . msg_control as * mut :: cmsghdr
548
548
} else {
549
- 0 as * mut :: cmsghdr
549
+ core :: ptr :: null_mut ( )
550
550
}
551
551
}
552
552
You can’t perform that action at this time.
0 commit comments