Making help_customer public doesn't make this child function public so we must also make it public
()
| 36 | // Making help_customer public doesn't make this child |
| 37 | // function public so we must also make it public |
| 38 | pub fn take_order() { |
| 39 | seat_at_table(); |
| 40 | |
| 41 | // super allows me to access pizza in the parent scope |
| 42 | let cust_pizza: super::Pizza = |
| 43 | super::Pizza::lunch("veggies"); |
| 44 | |
| 45 | serve_customer(cust_pizza); |
| 46 | } |
| 47 | |
| 48 | fn serve_customer(cust_pizza: super::Pizza){ |
| 49 | println!("The customer is served a regular pizza with {}", cust_pizza.topping); |
no test coverage detected