did modulule chapter.
This commit is contained in:
parent
335b1704fc
commit
0730e0f871
8
the_book/restaurant/Cargo.toml
Normal file
8
the_book/restaurant/Cargo.toml
Normal file
|
@ -0,0 +1,8 @@
|
|||
[package]
|
||||
name = "restaurant"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
1
the_book/restaurant/src/front_of_house.rs
Normal file
1
the_book/restaurant/src/front_of_house.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub mod hosting;
|
1
the_book/restaurant/src/front_of_house/hosting.rs
Normal file
1
the_book/restaurant/src/front_of_house/hosting.rs
Normal file
|
@ -0,0 +1 @@
|
|||
pub fn add_to_waitlist() {}
|
15
the_book/restaurant/src/lib.rs
Normal file
15
the_book/restaurant/src/lib.rs
Normal file
|
@ -0,0 +1,15 @@
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = 2 + 2;
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
mod front_of_house;
|
||||
|
||||
pub use crate::front_of_house::hosting;
|
||||
|
||||
pub fn eat_at_restaurant() {
|
||||
hosting::add_to_waitlist();
|
||||
}
|
Loading…
Reference in a new issue