From 3dfced8c673d5cd8e50e9f419e3ede434269d0cb Mon Sep 17 00:00:00 2001 From: Remo Senekowitsch Date: Mon, 28 Sep 2026 15:27:33 +0200 Subject: [PATCH] modules2: obey name convention for reexported consts Clippy doesn't warn against this, but a reexport should probably obey the same naming convention as the item it is a reexport of. --- exercises/10_modules/modules2.rs | 4 ++-- solutions/10_modules/modules2.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/10_modules/modules2.rs b/exercises/10_modules/modules2.rs index 782a70ea..97f01fff 100644 --- a/exercises/10_modules/modules2.rs +++ b/exercises/10_modules/modules2.rs @@ -20,7 +20,7 @@ mod delicious_snacks { fn main() { println!( "favorite snacks: {} and {}", - delicious_snacks::fruit, - delicious_snacks::veggie, + delicious_snacks::FRUIT, + delicious_snacks::VEGGIE, ); } diff --git a/solutions/10_modules/modules2.rs b/solutions/10_modules/modules2.rs index 55c316d7..fb0a6779 100644 --- a/solutions/10_modules/modules2.rs +++ b/solutions/10_modules/modules2.rs @@ -1,7 +1,7 @@ mod delicious_snacks { // Added `pub` and used the expected alias after `as`. - pub use self::fruits::PEAR as fruit; - pub use self::veggies::CUCUMBER as veggie; + pub use self::fruits::PEAR as FRUIT; + pub use self::veggies::CUCUMBER as VEGGIE; mod fruits { pub const PEAR: &str = "Pear"; @@ -17,7 +17,7 @@ mod delicious_snacks { fn main() { println!( "favorite snacks: {} and {}", - delicious_snacks::fruit, - delicious_snacks::veggie, + delicious_snacks::FRUIT, + delicious_snacks::VEGGIE, ); }