summaryrefslogtreecommitdiff
path: root/There is no truthiness.md
blob: a57336935d6f88a7acf833fe1db199cdc3ad1afe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
[[Rust]]

It does not work to write something like:
```rust
let number = 3;

if number {
// do something
}
```
like in other languages

Rust expects only a `bool` in an if statement, so we'd need to compare it.