Skip to content

Commit

Permalink
Update objc2 to v0.3.0-beta.2
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Aug 29, 2022
1 parent eddc540 commit 036c3de
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 33 deletions.
6 changes: 3 additions & 3 deletions cocoa-foundation/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
14 changes: 7 additions & 7 deletions cocoa-foundation/src/foundation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand All @@ -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]);
}

Expand Down Expand Up @@ -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]);
}

Expand Down Expand Up @@ -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]);
}

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion cocoa-foundation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions cocoa/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
10 changes: 5 additions & 5 deletions cocoa/src/quartzcore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,7 @@ pub mod transaction {

#[inline]
pub fn set_completion_block<F>(block: ConcreteBlock<(), (), F>)
where F: 'static + IntoConcreteBlock<(), Ret = ()> {
where F: 'static + IntoConcreteBlock<(), Output = ()> {
unsafe {
let block = block.copy();
msg_send![class!(CATransaction), setCompletionBlock:&*block]
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand All @@ -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(&<Self as ::objc2_encode::Encode>::ENCODING);
}

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion core-foundation-sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core-foundation-sys/src/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion core-foundation-sys/src/attributed_string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion core-foundation-sys/src/dictionary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion core-foundation-sys/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion core-graphics-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 4 additions & 4 deletions core-graphics-types/src/geometry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}

Expand Down Expand Up @@ -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]);
}

Expand Down Expand Up @@ -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]);
}

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion core-graphics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
6 changes: 3 additions & 3 deletions core-graphics/src/sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {}
Expand All @@ -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 {}
Expand Down

0 comments on commit 036c3de

Please sign in to comment.