Skip to content

Commit d2c07a8

Browse files
Update lib.rs
1 parent 12aa81f commit d2c07a8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

reverse-string/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
13
pub fn reverse(input: &str) -> String {
2-
unimplemented!("Write a function to reverse {}", input);
4+
let drow: String = input.chars().rev().collect::<String>();
5+
return drow;
36
}

0 commit comments

Comments
 (0)