Advertisement
cwchen

[Rust] Calling Basketball class.

Sep 4th, 2017
3,340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.23 KB | None | 0 0
  1. fn main() {
  2.     let b: Box<Item>= Box::new(Basketball::new());
  3.     println!("The color of the item is {}", b.color());
  4.     println!("The shape of the item is {}", b.shape());
  5.     println!("The name of the item is {}", b.name());
  6. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement