From 036c3de1c9fa3212bd7123141df4dce11b340a28 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Mon, 29 Aug 2022 03:35:43 +0200 Subject: [PATCH] Update objc2 to v0.3.0-beta.2 --- cocoa-foundation/Cargo.toml | 6 +++--- cocoa-foundation/src/foundation.rs | 14 +++++++------- cocoa-foundation/src/lib.rs | 2 +- cocoa/Cargo.toml | 6 +++--- cocoa/src/quartzcore.rs | 10 +++++----- core-foundation-sys/Cargo.toml | 2 +- core-foundation-sys/src/array.rs | 2 +- core-foundation-sys/src/attributed_string.rs | 2 +- core-foundation-sys/src/dictionary.rs | 2 +- core-foundation-sys/src/string.rs | 2 +- core-graphics-types/Cargo.toml | 2 +- core-graphics-types/src/geometry.rs | 8 ++++---- core-graphics/Cargo.toml | 2 +- core-graphics/src/sys.rs | 6 +++--- 14 files changed, 33 insertions(+), 33 deletions(-) diff --git a/cocoa-foundation/Cargo.toml b/cocoa-foundation/Cargo.toml index 523a6d145..44a4083b3 100644 --- a/cocoa-foundation/Cargo.toml +++ b/cocoa-foundation/Cargo.toml @@ -12,11 +12,11 @@ license = "MIT / Apache-2.0" default-target = "x86_64-apple-darwin" [dependencies] -block = { version = "=0.2.0-alpha.5", package = "block2" } +block = { version = "=0.2.0-alpha.6", package = "block2" } bitflags = "1.0" libc = "0.2" core-foundation = { path = "../core-foundation", version = "0.9" } core-graphics-types = { path = "../core-graphics-types", version = "0.1" } foreign-types = "0.3" -objc2 = { version = "=0.3.0-beta.1" } -objc2-encode = { version = "=2.0.0-pre.1" } +objc2 = { version = "=0.3.0-beta.2" } +objc2-encode = { version = "=2.0.0-pre.2" } diff --git a/cocoa-foundation/src/foundation.rs b/cocoa-foundation/src/foundation.rs index ba04996ba..4cd83a18b 100644 --- a/cocoa-foundation/src/foundation.rs +++ b/cocoa-foundation/src/foundation.rs @@ -58,7 +58,7 @@ mod macos { } unsafe impl Encode for NSPoint { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGPoint", &[CGFloat::ENCODING, CGFloat::ENCODING]); } @@ -80,7 +80,7 @@ mod macos { } unsafe impl Encode for NSSize { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGSize", &[CGFloat::ENCODING, CGFloat::ENCODING]); } @@ -116,7 +116,7 @@ mod macos { } unsafe impl Encode for NSRect { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGRect", &[NSPoint::ENCODING, NSSize::ENCODING]); } @@ -161,7 +161,7 @@ pub struct NSRange { } unsafe impl Encode for NSRange { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("_NSRange", &[NSUInteger::ENCODING, NSUInteger::ENCODING]); } @@ -209,7 +209,7 @@ pub struct NSOperatingSystemVersion { } unsafe impl Encode for NSOperatingSystemVersion { - const ENCODING: Encoding<'static> = Encoding::Struct( + const ENCODING: Encoding = Encoding::Struct( "NSOperatingSystemVersion", &[ NSUInteger::ENCODING, @@ -681,7 +681,7 @@ struct NSFastEnumerationState { } unsafe impl Encode for NSFastEnumerationState { - const ENCODING: Encoding<'static> = Encoding::Struct( + const ENCODING: Encoding = Encoding::Struct( "?", &[ libc::c_ulong::ENCODING, @@ -693,7 +693,7 @@ unsafe impl Encode for NSFastEnumerationState { } unsafe impl RefEncode for NSFastEnumerationState { - const ENCODING_REF: Encoding<'static> = Encoding::Pointer(&Self::ENCODING); + const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING); } const NS_FAST_ENUM_BUF_SIZE: usize = 16; diff --git a/cocoa-foundation/src/lib.rs b/cocoa-foundation/src/lib.rs index 02dc70303..a22b62694 100644 --- a/cocoa-foundation/src/lib.rs +++ b/cocoa-foundation/src/lib.rs @@ -26,7 +26,7 @@ pub use objc2_encode as __objc2_encode; macro_rules! impl_Encode { ($t:ty, $delegation:ty) => { unsafe impl $crate::__objc2_encode::Encode for $t { - const ENCODING: $crate::__objc2_encode::Encoding<'static> = <$delegation>::ENCODING; + const ENCODING: $crate::__objc2_encode::Encoding = <$delegation>::ENCODING; } } } diff --git a/cocoa/Cargo.toml b/cocoa/Cargo.toml index be2460658..9510cea47 100644 --- a/cocoa/Cargo.toml +++ b/cocoa/Cargo.toml @@ -12,12 +12,12 @@ license = "MIT / Apache-2.0" default-target = "x86_64-apple-darwin" [dependencies] -block = { version = "=0.2.0-alpha.5", package = "block2" } +block = { version = "=0.2.0-alpha.6", package = "block2" } bitflags = "1.0" libc = "0.2" cocoa-foundation = { path = "../cocoa-foundation", version = "0.1" } core-foundation = { path = "../core-foundation", version = "0.9" } core-graphics = { path = "../core-graphics", version = "0.22" } foreign-types = "0.3" -objc2 = { version = "=0.3.0-beta.1" } -objc2-encode = { version = "=2.0.0-pre.1" } +objc2 = { version = "=0.3.0-beta.2" } +objc2-encode = { version = "=2.0.0-pre.2" } diff --git a/cocoa/src/quartzcore.rs b/cocoa/src/quartzcore.rs index c5ba88ce7..13e669cb3 100644 --- a/cocoa/src/quartzcore.rs +++ b/cocoa/src/quartzcore.rs @@ -1632,7 +1632,7 @@ pub mod transaction { #[inline] pub fn set_completion_block(block: ConcreteBlock<(), (), F>) - where F: 'static + IntoConcreteBlock<(), Ret = ()> { + where F: 'static + IntoConcreteBlock<(), Output = ()> { unsafe { let block = block.copy(); msg_send![class!(CATransaction), setCompletionBlock:&*block] @@ -1668,7 +1668,7 @@ pub struct CATransform3D { } unsafe impl ::objc2_encode::Encode for CATransform3D { - const ENCODING: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Array(16, &CGFloat::ENCODING); + const ENCODING: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Array(16, &CGFloat::ENCODING); } impl PartialEq for CATransform3D { @@ -1824,7 +1824,7 @@ pub struct CVTimeStamp { } unsafe impl ::objc2_encode::Encode for CVTimeStamp { - const ENCODING: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Struct( + const ENCODING: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Struct( "CVTimeStamp", &[ u32::ENCODING, @@ -1841,7 +1841,7 @@ unsafe impl ::objc2_encode::Encode for CVTimeStamp { } unsafe impl ::objc2_encode::RefEncode for CVTimeStamp { - const ENCODING_REF: ::objc2_encode::Encoding<'static> = + const ENCODING_REF: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Pointer(&::ENCODING); } @@ -1874,7 +1874,7 @@ pub struct CVSMPTETime { } unsafe impl ::objc2_encode::Encode for CVSMPTETime { - const ENCODING: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Struct( + const ENCODING: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Struct( "CVSMPTETime", &[ i16::ENCODING, diff --git a/core-foundation-sys/Cargo.toml b/core-foundation-sys/Cargo.toml index 816fb2cb1..a11c41889 100644 --- a/core-foundation-sys/Cargo.toml +++ b/core-foundation-sys/Cargo.toml @@ -8,7 +8,7 @@ authors = ["The Servo Project Developers"] license = "MIT / Apache-2.0" [dependencies] -objc2-encode = { version = "=2.0.0-pre.1" } +objc2-encode = { version = "=2.0.0-pre.2" } [features] mac_os_10_7_support = [] # backwards compatibility diff --git a/core-foundation-sys/src/array.rs b/core-foundation-sys/src/array.rs index 2e0bad0f2..f899432fb 100644 --- a/core-foundation-sys/src/array.rs +++ b/core-foundation-sys/src/array.rs @@ -36,7 +36,7 @@ pub type CFArrayRef = *const __CFArray; pub type CFMutableArrayRef = *mut __CFArray; unsafe impl ::objc2_encode::RefEncode for __CFArray { - const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object; + const ENCODING_REF: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Object; } extern { diff --git a/core-foundation-sys/src/attributed_string.rs b/core-foundation-sys/src/attributed_string.rs index 5f4b984ef..8101c6bc8 100644 --- a/core-foundation-sys/src/attributed_string.rs +++ b/core-foundation-sys/src/attributed_string.rs @@ -19,7 +19,7 @@ pub type CFAttributedStringRef = *const __CFAttributedString; pub type CFMutableAttributedStringRef = *const __CFAttributedString; unsafe impl ::objc2_encode::RefEncode for __CFAttributedString { - const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object; + const ENCODING_REF: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Object; } extern { diff --git a/core-foundation-sys/src/dictionary.rs b/core-foundation-sys/src/dictionary.rs index 90df209ed..d88d33e52 100644 --- a/core-foundation-sys/src/dictionary.rs +++ b/core-foundation-sys/src/dictionary.rs @@ -48,7 +48,7 @@ pub type CFDictionaryRef = *const __CFDictionary; pub type CFMutableDictionaryRef = *mut __CFDictionary; unsafe impl ::objc2_encode::RefEncode for __CFDictionary { - const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object; + const ENCODING_REF: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Object; } extern { diff --git a/core-foundation-sys/src/string.rs b/core-foundation-sys/src/string.rs index d141cbbc0..ab1eddf38 100644 --- a/core-foundation-sys/src/string.rs +++ b/core-foundation-sys/src/string.rs @@ -193,7 +193,7 @@ pub struct __CFString(c_void); pub type CFStringRef = *const __CFString; unsafe impl ::objc2_encode::RefEncode for __CFString { - const ENCODING_REF: ::objc2_encode::Encoding<'static> = ::objc2_encode::Encoding::Object; + const ENCODING_REF: ::objc2_encode::Encoding = ::objc2_encode::Encoding::Object; } extern { diff --git a/core-graphics-types/Cargo.toml b/core-graphics-types/Cargo.toml index d4b556117..668336123 100644 --- a/core-graphics-types/Cargo.toml +++ b/core-graphics-types/Cargo.toml @@ -12,7 +12,7 @@ bitflags = "1.0" core-foundation = { path = "../core-foundation", version = "0.9" } foreign-types = "0.3.0" libc = "0.2" -objc2-encode = { version = "=2.0.0-pre.1" } +objc2-encode = { version = "=2.0.0-pre.2" } [package.metadata.docs.rs] default-target = "x86_64-apple-darwin" diff --git a/core-graphics-types/src/geometry.rs b/core-graphics-types/src/geometry.rs index 597deebf8..8b0f7e205 100644 --- a/core-graphics-types/src/geometry.rs +++ b/core-graphics-types/src/geometry.rs @@ -41,7 +41,7 @@ pub struct CGSize { } unsafe impl Encode for CGSize { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGSize", &[CGFloat::ENCODING, CGFloat::ENCODING]); } @@ -70,7 +70,7 @@ pub struct CGPoint { } unsafe impl Encode for CGPoint { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGPoint", &[CGFloat::ENCODING, CGFloat::ENCODING]); } @@ -99,7 +99,7 @@ pub struct CGRect { } unsafe impl Encode for CGRect { - const ENCODING: Encoding<'static> = + const ENCODING: Encoding = Encoding::Struct("CGRect", &[CGPoint::ENCODING, CGSize::ENCODING]); } @@ -168,7 +168,7 @@ pub struct CGAffineTransform { } unsafe impl Encode for CGAffineTransform { - const ENCODING: Encoding<'static> = Encoding::Struct( + const ENCODING: Encoding = Encoding::Struct( "CGAffineTransform", &[ CGFloat::ENCODING, diff --git a/core-graphics/Cargo.toml b/core-graphics/Cargo.toml index 789fdc974..2de8a6101 100644 --- a/core-graphics/Cargo.toml +++ b/core-graphics/Cargo.toml @@ -18,7 +18,7 @@ core-foundation = { path = "../core-foundation", version = "0.9" } core-graphics-types = { path = "../core-graphics-types", version = "0.1" } foreign-types = "0.3.0" libc = "0.2" -objc2-encode = { version = "=2.0.0-pre.1" } +objc2-encode = { version = "=2.0.0-pre.2" } [package.metadata.docs.rs] default-target = "x86_64-apple-darwin" diff --git a/core-graphics/src/sys.rs b/core-graphics/src/sys.rs index 223577ffd..a96f3053d 100644 --- a/core-graphics/src/sys.rs +++ b/core-graphics/src/sys.rs @@ -9,7 +9,7 @@ pub type CGImageRef = *mut CGImage; pub struct __CGColor(c_void); unsafe impl RefEncode for __CGColor { - const ENCODING_REF: Encoding<'static> = Encoding::Unknown; + const ENCODING_REF: Encoding = Encoding::Unknown; } pub type CGColorRef = *const __CGColor; @@ -21,7 +21,7 @@ pub enum CGPath {} pub type CGPathRef = *mut CGPath; unsafe impl RefEncode for CGPath { - const ENCODING_REF: Encoding<'static> = Encoding::Unknown; + const ENCODING_REF: Encoding = Encoding::Unknown; } pub enum CGDataProvider {} @@ -34,7 +34,7 @@ pub enum CGContext {} pub type CGContextRef = *mut CGContext; unsafe impl RefEncode for CGContext { - const ENCODING_REF: Encoding<'static> = Encoding::Unknown; + const ENCODING_REF: Encoding = Encoding::Unknown; } pub enum CGGradient {}