parent
f874d76289
commit
53a89f28a0
1 changed files with 0 additions and 14 deletions
|
|
@ -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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue