From 75c8a1e2533393c5ed37ff66fd8c6c673f5b0764 Mon Sep 17 00:00:00 2001 From: Johnny Walker Date: Sun, 31 Jul 2022 17:39:23 +0100 Subject: [PATCH] Create footnote so body makes sense Move line to footnote so the body copy flows correctly --- control-flow.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/control-flow.md b/control-flow.md index fe81429..2dc93aa 100644 --- a/control-flow.md +++ b/control-flow.md @@ -7,7 +7,7 @@ that the braces are mandatory, but parentheses around the expression being teste are not. Another is that `if` is an expression, so you can use it the same way as the ternary `?:` operator in C++ (remember from the previous section that if the last expression in a block is not terminated by a semi-colon, then it becomes the -value of the block). There is no ternary `?:` in Rust. So, the following two +value of the block).[1](#1) So, the following two functions do the same thing: ```rust @@ -231,3 +231,7 @@ are always called via the `.` operator (no `->`, more on this in another post). We saw a few examples above (`len`, `iter`). We'll go into more detail in the future about how they are defined and called. Most assumptions you might make from C++ or Java are probably correct. + + +#### 1 +There is no ternary `?:` in Rust.