summaryrefslogtreecommitdiff
path: root/exercises/13_error_handling
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/13_error_handling')
-rw-r--r--exercises/13_error_handling/errors1.rs2
-rw-r--r--exercises/13_error_handling/errors2.rs2
-rw-r--r--exercises/13_error_handling/errors3.rs2
3 files changed, 3 insertions, 3 deletions
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<String> {
+fn generate_nametag_text(name: String) -> Option<String> {
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<i32, ParseIntError> {
+fn total_cost(item_quantity: &str) -> Result<i32, ParseIntError> {
let processing_fee = 1;
let cost_per_item = 5;
let qty = item_quantity.parse::<i32>();
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<i32, ParseIntError> {
+fn total_cost(item_quantity: &str) -> Result<i32, ParseIntError> {
let processing_fee = 1;
let cost_per_item = 5;
let qty = item_quantity.parse::<i32>()?;