From 5dc356d98e24e69d8a04ffe1cd84ad2600cc5a19 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Thu, 16 Jan 2025 16:08:15 +0100 Subject: [PATCH] Add demonstration of rust's default visibility --- restaurant/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/restaurant/src/lib.rs b/restaurant/src/lib.rs index 591e245..f102a02 100644 --- a/restaurant/src/lib.rs +++ b/restaurant/src/lib.rs @@ -13,3 +13,11 @@ mod front_of_house { fn take_payment() {} } } + +pub fn eat_at_restaurant() { + // Absolute path + crate::front_of_house::hosting::add_to_waitlist(); + + // Relative path + front_of_house::hosting::add_to_waitlist(); +}