Upgrade to Rust new enums.