Edit: Please see Shepmaster's answer for the latest idiom. The idiomatic way would be match *self { Animal::Cat(ref c) => f.write_str("c"), Animal::Dog ...
確定! 回上一頁