From 4c94911c4628ec0eb474250739b0e2ad03ea7029 Mon Sep 17 00:00:00 2001 From: Augusto Date: Mon, 8 Feb 2021 20:29:37 +0000 Subject: [PATCH] Correct subject for doubtful --- subjects/doubtful/README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/subjects/doubtful/README.md b/subjects/doubtful/README.md index fcdae000..c8c0bb9f 100644 --- a/subjects/doubtful/README.md +++ b/subjects/doubtful/README.md @@ -2,14 +2,20 @@ ### Instructions -Write a function called `doubtful` that adds to every string passed to it a question mark (?) +Write a function called `doubtful` that adds to every string passed to it a question mark (?). -You have to fix the code to make it compile an for that you can only modify the code where is indicated +You have to complete the signature the functions to make it fit the usage and you also have to modify the usage to be able to do what is expected. + +- Restrictions: + + - `doubtful` cannot return any value. + + - And in the example of the usage you can only modify the argument of the function ### Expected ```rust -pub fn doubtful(s: &mut String) { +pub fn doubtful(s: /*give the correct type*/ ) { } ``` @@ -22,7 +28,9 @@ fn main() { let mut s = String::from("Hello"); println!("Before changing the string: {}", s); - doubtful(&mut s); + + doubtful(/*add your code here*/); + println!("After changing the string: {}", s); } ```