From ce7e08d600be59cddbb2fdbfe23b0636cc3bb777 Mon Sep 17 00:00:00 2001 From: ds-cbo <82801887+ds-cbo@users.noreply.github.com> Date: Wed, 1 Nov 2023 17:03:37 +0100 Subject: [PATCH] bump bitflags to 2 --- Cargo.toml | 1 + system-configuration-sys/Cargo.toml | 2 +- system-configuration/Cargo.toml | 2 +- system-configuration/src/network_reachability.rs | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 50e7845..9eee9f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,3 +3,4 @@ members = [ "system-configuration-sys", "system-configuration", ] +resolver = "2" diff --git a/system-configuration-sys/Cargo.toml b/system-configuration-sys/Cargo.toml index 5c144e2..2431b13 100644 --- a/system-configuration-sys/Cargo.toml +++ b/system-configuration-sys/Cargo.toml @@ -11,4 +11,4 @@ edition = "2021" [dependencies] core-foundation-sys = "0.8" -libc = "0.2.49" +libc = "0.2.149" diff --git a/system-configuration/Cargo.toml b/system-configuration/Cargo.toml index 78cccd3..3760f52 100644 --- a/system-configuration/Cargo.toml +++ b/system-configuration/Cargo.toml @@ -13,4 +13,4 @@ edition = "2021" [dependencies] core-foundation = "0.9" system-configuration-sys = { path = "../system-configuration-sys", version = "0.5" } -bitflags = "1" +bitflags = "2" diff --git a/system-configuration/src/network_reachability.rs b/system-configuration/src/network_reachability.rs index 037f53d..2d4d5a2 100644 --- a/system-configuration/src/network_reachability.rs +++ b/system-configuration/src/network_reachability.rs @@ -297,7 +297,7 @@ impl NetworkReachabilityCallbackContext< context: *mut c_void, ) { let context: &mut Self = unsafe { &mut (*(context as *mut _)) }; - (context.callback)(unsafe { ReachabilityFlags::from_bits_unchecked(flags) }); + (context.callback)(ReachabilityFlags::from_bits_retain(flags)); } extern "C" fn copy_ctx_description(_ctx: *const c_void) -> CFStringRef {