From 3bb71c6b0c9d58e421f79d914f5483cb5a98af0b Mon Sep 17 00:00:00 2001 From: mo8it Date: Wed, 22 May 2024 15:04:12 +0200 Subject: Remove unneeded pub --- exercises/13_error_handling/errors1.rs | 2 +- exercises/13_error_handling/errors2.rs | 2 +- exercises/13_error_handling/errors3.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'exercises/13_error_handling') diff --git a/exercises/13_error_handling/errors1.rs b/exercises/13_error_handling/errors1.rs index 15a3716..e3e0482 100644 --- a/exercises/13_error_handling/errors1.rs +++ b/exercises/13_error_handling/errors1.rs @@ -8,7 +8,7 @@ fn main() { // You can optionally experiment here. } -pub fn generate_nametag_text(name: String) -> Option { +fn generate_nametag_text(name: String) -> Option { if name.is_empty() { // Empty names aren't allowed. None diff --git a/exercises/13_error_handling/errors2.rs b/exercises/13_error_handling/errors2.rs index e39aa95..345a0ee 100644 --- a/exercises/13_error_handling/errors2.rs +++ b/exercises/13_error_handling/errors2.rs @@ -16,7 +16,7 @@ use std::num::ParseIntError; -pub fn total_cost(item_quantity: &str) -> Result { +fn total_cost(item_quantity: &str) -> Result { let processing_fee = 1; let cost_per_item = 5; let qty = item_quantity.parse::(); diff --git a/exercises/13_error_handling/errors3.rs b/exercises/13_error_handling/errors3.rs index 5661f17..2ef84f9 100644 --- a/exercises/13_error_handling/errors3.rs +++ b/exercises/13_error_handling/errors3.rs @@ -18,7 +18,7 @@ fn main() { } } -pub fn total_cost(item_quantity: &str) -> Result { +fn total_cost(item_quantity: &str) -> Result { let processing_fee = 1; let cost_per_item = 5; let qty = item_quantity.parse::()?; -- cgit v1.2.3