diff options
Diffstat (limited to 'exercises/if')
| -rw-r--r-- | exercises/if/if1.rs | 35 |
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. |
