39 lines
734 B
Rust
39 lines
734 B
Rust
mod front_of_house;
|
|
|
|
pub use crate::front_of_house::hosting;
|
|
|
|
fn deliver_order() {}
|
|
|
|
mod back_of_house {
|
|
pub struct Breakfast {
|
|
pub toast: String,
|
|
seasonal_fruit: String,
|
|
}
|
|
pub enum Appetizer {
|
|
Soup,
|
|
Salad,
|
|
}
|
|
impl Breakfast {
|
|
pub fn summer(toast: &str) -> Breakfast {
|
|
Breakfast {
|
|
toast: String::from(toast),
|
|
seasonal_fruit:String::from("Peaches"),
|
|
}
|
|
}
|
|
}
|
|
|
|
fn fix_incorrect_order(){
|
|
cook_order();
|
|
super::deliver_order();
|
|
}
|
|
fn cook_order(){}
|
|
}
|
|
|
|
|
|
mod customer {
|
|
use crate::front_of_house::hosting;
|
|
pub fn eat_at_restaurant() {
|
|
hosting::add_to_waitlist();
|
|
}
|
|
}
|