mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 05:40:04 -04:00
@@ -1,14 +0,0 @@
|
|||||||
use cocoa::base::{id, nil};
|
|
||||||
|
|
||||||
pub trait IntoOption: Sized {
|
|
||||||
fn into_option(self) -> Option<Self>;
|
|
||||||
}
|
|
||||||
|
|
||||||
impl IntoOption for id {
|
|
||||||
fn into_option(self) -> Option<Self> {
|
|
||||||
match self != nil {
|
|
||||||
true => Some(self),
|
|
||||||
false => None,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user