mirror of
https://github.com/gnu4cn/rust-lang-zh_CN.git
synced 2025-03-22 23:30:32 +08:00
15 lines
184 B
Rust
15 lines
184 B
Rust
enum Option_i32 {
|
|
Some(i32),
|
|
None,
|
|
}
|
|
|
|
enum Option_f64 {
|
|
Some(f64),
|
|
None,
|
|
}
|
|
|
|
fn main() {
|
|
let integer = Option_i32::Some(5);
|
|
let float = Option_f64::Some(5.0);
|
|
}
|