File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -65,29 +65,29 @@ impl FileDesc {
65
65
pub fn set_cloexec ( & self ) {
66
66
unsafe {
67
67
let ret = libc:: ioctl ( self . fd , libc:: FIOCLEX ) ;
68
- debug_assert_eq ! ( ret, 0 ) ;
68
+ assert_eq ! ( ret, 0 ) ;
69
69
}
70
70
}
71
71
#[ cfg( any( target_env = "newlib" , target_os = "solaris" , target_os = "emscripten" ) ) ]
72
72
pub fn set_cloexec ( & self ) {
73
73
unsafe {
74
74
let previous = libc:: fcntl ( self . fd , libc:: F_GETFD ) ;
75
75
let ret = libc:: fcntl ( self . fd , libc:: F_SETFD , previous | libc:: FD_CLOEXEC ) ;
76
- debug_assert_eq ! ( ret, 0 ) ;
76
+ assert_eq ! ( ret, 0 ) ;
77
77
}
78
78
}
79
79
80
80
pub fn set_nonblocking ( & self , nonblocking : bool ) {
81
81
unsafe {
82
82
let previous = libc:: fcntl ( self . fd , libc:: F_GETFL ) ;
83
- debug_assert ! ( previous != -1 ) ;
83
+ assert ! ( previous != -1 ) ;
84
84
let new = if nonblocking {
85
85
previous | libc:: O_NONBLOCK
86
86
} else {
87
87
previous & !libc:: O_NONBLOCK
88
88
} ;
89
89
let ret = libc:: fcntl ( self . fd , libc:: F_SETFL , new) ;
90
- debug_assert ! ( ret != -1 ) ;
90
+ assert ! ( ret != -1 ) ;
91
91
}
92
92
}
93
93
You can’t perform that action at this time.
0 commit comments