1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-06-21 00:19:41 +02:00
Files
.devcontainer
.github
.vscode
exercises
00_intro
01_variables
02_functions
03_if
04_primitive_types
05_vecs
06_move_semantics
07_structs
08_enums
09_strings
README.md
strings1.rs
strings2.rs
strings3.rs
strings4.rs
10_modules
11_hashmaps
12_options
13_error_handling
14_generics
15_traits
16_lifetimes
17_tests
18_iterators
19_smart_pointers
20_threads
21_macros
22_clippy
23_conversions
README.md
quiz1.rs
quiz2.rs
quiz3.rs
src
tests
.all-contributorsrc
.editorconfig
.gitattributes
.gitignore
.gitpod.yml
.markdownlint.yml
AUTHORS.md
CHANGELOG.md
CONTRIBUTING.md
Cargo.lock
Cargo.toml
LICENSE
README.md
flake.lock
flake.nix
info.toml
install.ps1
install.sh
oranda.json
shell.nix
rustlings/exercises/09_strings/strings1.rs

18 lines
355 B
Rust
Raw Normal View History

2018-02-21 22:09:53 -08:00
// strings1.rs
//
// Make me compile without changing the function signature!
//
// Execute `rustlings hint strings1` or use the `hint` watch subcommand for a
// hint.
// I AM NOT DONE
fn main() {
let answer = current_favorite_color();
println!("My current favorite color is {}", answer);
}
fn current_favorite_color() -> String {
"blue"
}