Skip to content

Commit d07caaf

Browse files
committed
Update io-kit-sys to 0.5.0
1 parent 57aaa81 commit d07caaf

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ windows-sys = { version = ">= 0.60, <= 0.61", features = ["Win32_Devices_Usb", "
3131
[target.'cfg(target_os="macos")'.dependencies]
3232
core-foundation = "0.10.1"
3333
core-foundation-sys = "0.8.4"
34-
io-kit-sys = "0.4.0"
34+
io-kit-sys = "0.5.0"
3535

3636
[target.'cfg(any(target_os="linux", target_os="android", target_os="windows", target_os="macos"))'.dependencies]
3737
blocking = { version = "1.6.1", optional = true }

src/platform/macos_iokit/device.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ impl MacDevice {
147147

148148
pub(crate) fn configuration_descriptors(
149149
&self,
150-
) -> impl Iterator<Item = ConfigurationDescriptor> {
150+
) -> impl Iterator<Item = ConfigurationDescriptor<'_>> {
151151
self.config_descriptors
152152
.iter()
153153
.map(|d| ConfigurationDescriptor::new_unchecked(&d[..]))
@@ -343,7 +343,7 @@ impl MacDevice {
343343
let res = unsafe {
344344
call_iokit_function!(
345345
self.device.raw,
346-
DeviceRequestAsyncTO(&mut req, transfer_callback, ptr as *mut c_void)
346+
DeviceRequestAsyncTO(&mut req, Some(transfer_callback), ptr as *mut c_void)
347347
)
348348
};
349349

@@ -564,7 +564,7 @@ impl MacEndpoint {
564564
self.inner.pipe_ref,
565565
buf_ptr as *mut c_void,
566566
req_len,
567-
transfer_callback,
567+
Some(transfer_callback),
568568
ptr as *mut c_void
569569
)
570570
),
@@ -574,7 +574,7 @@ impl MacEndpoint {
574574
self.inner.pipe_ref,
575575
buf_ptr as *mut c_void,
576576
req_len,
577-
transfer_callback,
577+
Some(transfer_callback),
578578
ptr as *mut c_void
579579
)
580580
),

src/platform/macos_iokit/hotplug.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ fn register_notification(
154154
let mut iter = 0;
155155
let r = IOServiceAddMatchingNotification(
156156
port.0,
157-
event as *mut c_char,
157+
event as *const c_char,
158158
ManuallyDrop::new(dictionary.clone()).as_concrete_TypeRef(),
159159
callback,
160160
waker.0 as *mut c_void,

0 commit comments

Comments
 (0)