Rust 1.42 You can use std::matches: assert!(matches!(return_with_fields() ... fn is_with_fields(&self) -> bool { match self { MyEnum::WithFields { .
確定! 回上一頁