Skip to content

Commit 5a08503

Browse files
committed
Remove superfluous unsafe {}
1 parent 4fcc05c commit 5a08503

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

system-configuration/src/network_reachability.rs

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,11 @@ impl SCNetworkReachability {
196196
run_loop: &CFRunLoop,
197197
run_loop_mode: CFStringRef,
198198
) -> Result<(), SchedulingError> {
199-
if unsafe {
200-
SCNetworkReachabilityScheduleWithRunLoop(
201-
self.0,
202-
run_loop.to_void() as *mut _,
203-
run_loop_mode,
204-
)
205-
} == 0u8
199+
if SCNetworkReachabilityScheduleWithRunLoop(
200+
self.0,
201+
run_loop.to_void() as *mut _,
202+
run_loop_mode,
203+
) == 0u8
206204
{
207205
Err(SchedulingError(()))
208206
} else {
@@ -225,13 +223,11 @@ impl SCNetworkReachability {
225223
run_loop: &CFRunLoop,
226224
run_loop_mode: CFStringRef,
227225
) -> Result<(), UnschedulingError> {
228-
if unsafe {
229-
SCNetworkReachabilityUnscheduleFromRunLoop(
230-
self.0,
231-
run_loop.to_void() as *mut _,
232-
run_loop_mode,
233-
)
234-
} == 0u8
226+
if SCNetworkReachabilityUnscheduleFromRunLoop(
227+
self.0,
228+
run_loop.to_void() as *mut _,
229+
run_loop_mode,
230+
) == 0u8
235231
{
236232
Err(UnschedulingError(()))
237233
} else {

0 commit comments

Comments
 (0)