fn throw_panic(cars: Vec<&str>) { if cars.len() == 0 { panic!("No cars for sale"); } //具体实现…… }throw_panic(vec![]);