mirror of
https://github.com/jiangcuo/nix.git
synced 2026-01-22 13:46:50 +00:00
unistd: Redesign the enum returned by fork()
This changes the name of the enum returned by `fork()` to `ForkResult`,
and changes the `Parent` variant to be struct-like.
The result can be matched like
use nix::unistd::ForkResult::*;
match fork().unwrap() {
Parent { child } => { ... }
Child => { ... }
}
using the shorthand matching syntax for struct-like enum variants.
This is a breaking change.
|
||
|---|---|---|
| .. | ||
| mod.rs | ||
| test_ioctl.rs | ||
| test_select.rs | ||
| test_socket.rs | ||
| test_sockopt.rs | ||
| test_termios.rs | ||
| test_uio.rs | ||
| test_wait.rs | ||