put option_try macro def under #[cfg(unix)]
This commit is contained in:
parent
25b7f10c78
commit
6dbd706906
1 changed files with 1 additions and 0 deletions
|
|
@ -116,6 +116,7 @@ pub fn record_time<T, F>(accu: &Cell<Duration>, f: F) -> T where
|
|||
}
|
||||
|
||||
// Like std::macros::try!, but for Option<>.
|
||||
#[cfg(unix)]
|
||||
macro_rules! option_try(
|
||||
($e:expr) => (match $e { Some(e) => e, None => return None })
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue