File tree Expand file tree Collapse file tree
content/rust-intro/08-functions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ Identifying whether a number is odd or even is a classic example. The [is-odd
2929npm package] ( https://www.npmjs.com/package/is-odd ) became famous for being a
3030remarkably small and widely depended-upon piece of code:
3131
32- <img src =" /rust-intro/images/ is-odd.png" width = " 70% " fig-align = " center " />
32+ <img src =" is-odd.png " class = " w-8/10 mx-auto my-8 " />
3333
3434Here is the Rust equivalent. We define ` is_even() ` first, taking an ` i32 ` and
3535returning a ` bool ` , then use it inside ` is_odd() ` :
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Identifying whether a number is odd or even is a classic example. The [is-odd
2626npm package] ( https://www.npmjs.com/package/is-odd ) became famous for being a
2727remarkably small and widely depended-upon piece of code:
2828
29- ![ ] ( /rust-intro/images/ is-odd.png) {width=70% fig-align="center "}
29+ ![ ] ( is-odd.png ) {class="w-8/10 mx-auto my-8 "}
3030
3131Here is the Rust equivalent. We define ` is_even() ` first, taking an ` i32 ` and
3232returning a ` bool ` , then use it inside ` is_odd() ` :
File renamed without changes.
You can’t perform that action at this time.
0 commit comments