匹配当量 Rust 的宏,该宏使用来每个“ ”。 例子 use std :: ffi :: {OsStr, OsString}; assert_eq! ( match_eq! (OsString :: from ( ":party_popper:" ) => { ":jack-o-lantern:" => 0 , ":rocket:" , ":party_popper:" => - 1 , s = OsStr :: new ( ":party_popper:" ) => { drop :: (s); - 2 } ref s = ":party_popper:" , OsStr :: new ( ":rocket:" ) => { let _: & OsString = s; - 3 } _ = ":party_popper:" => un