Skip to content

Commit

Permalink
Fix Encode impl
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Sep 5, 2023
1 parent 420b6bf commit f765f3d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ impl CGSize {
}

unsafe impl Encode for CGSize {
/// Adds support for CGSize Objective-C encoding.
fn encode() -> Encoding {
let encoding = format!("{{CGSize={}{}}}", CGFloat::encode().as_str(), CGFloat::encode().as_str());

unsafe { Encoding::from_str(&encoding) }
}
const ENCODING: Encoding<'static> = Encoding::Struct("CGSize", &[CGFloat::ENCODING, CGFloat::ENCODING]);
}

/// A helper method for ensuring that Cocoa is running in multi-threaded mode.
Expand Down

0 comments on commit f765f3d

Please sign in to comment.