mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-21 11:23:03 +00:00
put option_try macro def under #[cfg(unix)]
This commit is contained in:
parent
25b7f10c78
commit
6dbd706906
@ -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…
Reference in New Issue
Block a user