From 8aa11819626e4825675d33a7e859076f90385c69 Mon Sep 17 00:00:00 2001 From: AlphonseMehounme Date: Wed, 4 Dec 2024 23:10:49 +0100 Subject: [PATCH] add ownership challenge solution --- Rust/rustifinity/challenges/ownership.rs | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 Rust/rustifinity/challenges/ownership.rs diff --git a/Rust/rustifinity/challenges/ownership.rs b/Rust/rustifinity/challenges/ownership.rs new file mode 100644 index 0000000..9ef109e --- /dev/null +++ b/Rust/rustifinity/challenges/ownership.rs @@ -0,0 +1,4 @@ +pub fn calculate_length(s: &String) -> usize { + // Your code here... + s.len() +}