trpl-zh-cn/listings/ch08-common-collections/listing-08-09/src/main.rs

16 lines
304 B
Rust

fn main() {
// ANCHOR: here
enum SpreadsheetCell {
Int(i32),
Float(f64),
Text(String),
}
let row = vec![
SpreadsheetCell::Int(3),
SpreadsheetCell::Text(String::from("blue")),
SpreadsheetCell::Float(10.12),
];
// ANCHOR_END: here
}