mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-01 22:51:45 +02:00
Clean up and unify exercises
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
// if1.rs
|
||||
//
|
||||
// Execute `rustlings hint if1` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
pub fn bigger(a: i32, b: i32) -> i32 {
|
||||
// Complete this function to return the bigger number!
|
||||
// If both numbers are equal, any of them can be returned.
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
// if2.rs
|
||||
//
|
||||
// Step 1: Make me compile!
|
||||
// Step 2: Get the bar_for_fuzz and default_to_baz tests passing!
|
||||
//
|
||||
// Execute `rustlings hint if2` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
pub fn foo_if_fizz(fizzish: &str) -> &str {
|
||||
if fizzish == "fizz" {
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
// if3.rs
|
||||
//
|
||||
// Execute `rustlings hint if3` or use the `hint` watch subcommand for a hint.
|
||||
|
||||
pub fn animal_habitat(animal: &str) -> &'static str {
|
||||
let identifier = if animal == "crab" {
|
||||
1
|
||||
|
||||
Reference in New Issue
Block a user