1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
pub fn add_lib(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
test();
assert_eq!(result, 4);
}
}
pub use crate::front_of_house::hosting;
pub use crate::front_of_house::hosting::add_to_waitlist;
pub fn test() {
crate::front_of_house::hosting::add_to_waitlist();
front_of_house::hosting::add_to_waitlist()
}
pub mod front_of_house {
pub mod hosting {
pub fn add_to_waitlist() {
print!("add_to_waitlist");
}
fn seat_at_table() {}
}
mod serving {
fn take_order() {}
fn serve_order() {}
fn take_payment() {}
}
}