summaryrefslogtreecommitdiff
path: root/exercises/if
diff options
context:
space:
mode:
authormarisa <mokou@posteo.de>2019-11-11 16:51:38 +0100
committermarisa <mokou@posteo.de>2019-11-11 16:51:38 +0100
commit9bdb0a12e45a8e9f9f6a4bd4a9c172c5376c7f60 (patch)
tree3c4a094d57ecedf9706e0ba567a9f157590177c8 /exercises/if
parent627cdc07d07dfe6a740e885e0ddf6900e7ec336b (diff)
feat: Refactor hint system
Hints are now accessible using the CLI subcommand `rustlings hint <exercise name`. BREAKING CHANGE: This fundamentally changes the way people interact with exercises.
Diffstat (limited to 'exercises/if')
-rw-r--r--exercises/if/if1.rs35
1 files changed, 1 insertions, 34 deletions
diff --git a/exercises/if/if1.rs b/exercises/if/if1.rs
index 6da09d3..bce052a 100644
--- a/exercises/if/if1.rs
+++ b/exercises/if/if1.rs
@@ -5,7 +5,7 @@ pub fn bigger(a: i32, b: i32) -> i32 {
// Do not use:
// - another function call
// - additional variables
- // Scroll down for hints.
+ // Execute `rustlings hint if1` for hints
}
// Don't mind this for now :)
@@ -23,36 +23,3 @@ mod tests {
assert_eq!(42, bigger(32, 42));
}
}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-// It's possible to do this in one line if you would like!
-// Some similar examples from other languages:
-// - In C(++) this would be: `a > b ? a : b`
-// - In Python this would be: `a if a > b else b`
-// Remember in Rust that:
-// - the `if` condition does not need to be surrounded by parentheses
-// - `if`/`else` conditionals are expressions
-// - Each condition is followed by a `{}` block.