summaryrefslogtreecommitdiff
path: root/solutions/09_strings/strings1.rs
blob: f7ba8114aeba3b8e5f6e75cfb51ab5784ba4b754 (plain)
1
2
3
4
5
6
7
8
9
fn current_favorite_color() -> String {
    // Equivalent to `String::from("blue")`
    "blue".to_string()
}

fn main() {
    let answer = current_favorite_color();
    println!("My current favorite color is {answer}");
}