Create Item

Definition of an item struct.
This commit is contained in:
2023-11-19 15:05:47 -05:00
parent 0f539d31ca
commit 6f2517c830
4 changed files with 35 additions and 1 deletions

18
src/lib.rs Normal file
View File

@@ -0,0 +1,18 @@
use std::error::Error;
mod item;
use item::Item;
pub fn run() -> Result<(), Box<dyn Error>> {
let item = Item {
name: String::from("Test Item"),
value: 300,
};
println!(
"This item is {} and it's value is {}.",
item.name, item.value
);
Ok(())
}