How do I instantiate this enum ? The second statement does not compile

前端 未结 0 1182
眼角桃花
眼角桃花 2021-01-30 23:44
enum X{
    None,
    Option(i64)
}

fn main() {
    println!("Hello, world!");
    let x = X::None;  // this is fine
    let y = X::Some(Some(None));   // thi         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题