This repository has been archived on 2023-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
rustlings-exercises-completed/exercises/strings/strings1.rs

13 lines
342 B
Rust
Raw Normal View History

2018-02-22 00:09:53 -06:00
// strings1.rs
// Make me compile without changing the function signature!
2022-07-14 05:18:21 -05:00
// Execute `rustlings hint strings1` or use the `hint` watch subcommand for a hint.
fn main() {
let answer = current_favorite_color();
println!("My current favorite color is {}", answer);
}
fn current_favorite_color() -> String {
2023-03-24 16:18:51 -05:00
String::from("blue")
}