mirror of
https://github.com/rust-lang/rustlings.git
synced 2026-01-06 18:59:19 +00:00
Fix current_favorite_color function to return a String
This commit is contained in:
parent
23a2a21036
commit
27d1c37b1c
@ -5,13 +5,11 @@
|
|||||||
// Execute `rustlings hint strings1` or use the `hint` watch subcommand for a
|
// Execute `rustlings hint strings1` or use the `hint` watch subcommand for a
|
||||||
// hint.
|
// hint.
|
||||||
|
|
||||||
// I AM NOT DONE
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let answer = current_favorite_color();
|
let answer = current_favorite_color();
|
||||||
println!("My current favorite color is {}", answer);
|
println!("My current favorite color is {}", answer);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn current_favorite_color() -> String {
|
fn current_favorite_color() -> String {
|
||||||
"blue"
|
String::from("blue")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user