From 256b11c507d2026d0fcf21e304647b3923d6d842 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 3 Dec 2023 08:07:25 +0100 Subject: [PATCH] Fix AnyProtocol in icrate --- crates/icrate/CHANGELOG.md | 1 + crates/icrate/src/common.rs | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/icrate/CHANGELOG.md b/crates/icrate/CHANGELOG.md index 6ff1ee68f..0110769f4 100644 --- a/crates/icrate/CHANGELOG.md +++ b/crates/icrate/CHANGELOG.md @@ -94,6 +94,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). implementations and methods for `NSPopover` and `NSLayoutAnchor`. - **BREAKING**: `CKSystemSharingUIObserver` and `CKLocationSortDescriptor` are no longer marked thread safe. - **BREAKING**: `NSColor::ignoresAlpha` now requires a main thread marker. +- **BREAKING**: Corrected usage of `AnyProtocol`. ## icrate 0.0.4 - 2023-07-31 diff --git a/crates/icrate/src/common.rs b/crates/icrate/src/common.rs index 641f0fd61..7f38a5c92 100644 --- a/crates/icrate/src/common.rs +++ b/crates/icrate/src/common.rs @@ -20,9 +20,9 @@ pub(crate) use objc2::mutability::{ #[cfg(feature = "objective-c")] pub(crate) use objc2::rc::{Allocated, DefaultId, Id}; #[cfg(feature = "objective-c")] -pub(crate) use objc2::runtime::{AnyClass, AnyObject, Bool, Sel}; -#[cfg(feature = "objective-c")] -pub(crate) use objc2::runtime::{NSObject, NSObjectProtocol, ProtocolObject}; +pub(crate) use objc2::runtime::{ + AnyClass, AnyObject, AnyProtocol, Bool, NSObject, NSObjectProtocol, ProtocolObject, Sel, +}; #[cfg(feature = "objective-c")] pub(crate) use objc2::{ __inner_extern_class, extern_class, extern_methods, extern_protocol, ClassType, Message, @@ -33,8 +33,6 @@ pub(crate) use objc2::{ pub(crate) use block2::Block; // TODO -#[cfg(feature = "objective-c")] -pub(crate) type AnyProtocol = AnyObject; pub(crate) type TodoFunction = *const c_void; #[cfg(feature = "objective-c")] pub(crate) type TodoClass = AnyObject;