-
-
Save Jammyjamjamman/3c09f03aeee70bae6ad95bca5f9e12c9 to your computer and use it in GitHub Desktop.
infer type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Item { | |
name: String, | |
weight: String, | |
mass: u64, | |
} | |
fn main() { | |
println!("Hello, world!"); | |
// should the weight be displayed using the metric system? | |
// Should the weight be using a value that can be used to auto-determine its mass? | |
let data = [ | |
Item { | |
name: String::from("Chocolate chip cookie"), | |
weight: String::from("2 ounces"), | |
mass: 0, | |
}, | |
Item { | |
name: String::from("Uranium"), | |
weight: String::from("1 ounces"), | |
mass: 0, | |
}, | |
Item { | |
name: String::from("Newborn baby"), | |
weight: String::from("8 pounds, 6 ounces"), | |
mass: 0, | |
}, | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment