MCPcopy Index your code
hub / github.com/derekbanas/Rust-Tutorial / take_order

Function take_order

mod.rs:38–46  ·  view source on GitHub ↗

Making help_customer public doesn't make this child function public so we must also make it public

()

Source from the content-addressed store, hash-verified

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);

Callers 1

order_foodFunction · 0.85

Calls 2

seat_at_tableFunction · 0.85
serve_customerFunction · 0.85

Tested by

no test coverage detected