File tree Expand file tree Collapse file tree 7 files changed +64
-1
lines changed Expand file tree Collapse file tree 7 files changed +64
-1
lines changed Original file line number Diff line number Diff line change 1- pub fn foo ( ) { }
1+ pub mod restaurant ;
Original file line number Diff line number Diff line change 1+ use rust_template:: restaurant;
2+
13fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
4+ println ! ( "Welcome at {}" , restaurant:: display_name( ) ) ;
5+ restaurant:: foh:: process_visit ( ) ;
26 Ok ( ( ) )
37}
Original file line number Diff line number Diff line change 1+ pub fn fix_incorrect_order ( ) {
2+ println ! ( "Fix incorrect order:" ) ;
3+ cook_order ( ) ;
4+ super :: deliver_order ( ) ;
5+ }
6+
7+ pub fn cook_order ( ) {
8+ println ! ( "Cook order" ) ;
9+ }
Original file line number Diff line number Diff line change 1+ pub fn add_to_wait_list ( ) {
2+ println ! ( "Add to wait list" ) ;
3+ }
4+
5+ pub fn seat_at_table ( ) {
6+ println ! ( "Seat at table" ) ;
7+ }
8+
9+ pub fn welcome ( ) { }
Original file line number Diff line number Diff line change 1+ pub mod hosting;
2+ pub mod serving;
3+
4+ pub fn process_visit ( ) {
5+ hosting:: welcome ( ) ;
6+ hosting:: add_to_wait_list ( ) ;
7+ hosting:: seat_at_table ( ) ;
8+ serving:: take_order ( ) ;
9+ serving:: serve_order ( ) ;
10+ super :: boh:: cook_order ( ) ;
11+ serving:: take_complaint ( ) ;
12+ super :: boh:: fix_incorrect_order ( ) ;
13+ serving:: take_payment ( ) ;
14+ }
Original file line number Diff line number Diff line change 1+ use crate :: restaurant;
2+
3+ pub fn take_order ( ) {
4+ println ! ( "Take order" ) ;
5+ }
6+
7+ pub fn serve_order ( ) {
8+ println ! ( "Serve order" ) ;
9+ }
10+
11+ pub fn take_payment ( ) {
12+ println ! ( "Thanks for your visit at {}" , restaurant:: display_name( ) ) ;
13+ }
14+
15+ pub fn take_complaint ( ) {
16+ println ! ( "Take complaint" ) ;
17+ }
Original file line number Diff line number Diff line change 1+ pub fn display_name ( ) -> & ' static str {
2+ "Greek restaurant"
3+ }
4+
5+ fn deliver_order ( ) {
6+ println ! ( "Deliver order" ) ;
7+ }
8+
9+ pub mod boh;
10+ pub mod foh;
You can’t perform that action at this time.
0 commit comments