From 738bd672d49371796012b515c163af9238054dac Mon Sep 17 00:00:00 2001 From: Guillaume Date: Mon, 1 Sep 2025 10:56:39 +0200 Subject: [PATCH] fix: correct arithmetic operation results in Rust reference --- source/_posts/rust.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_posts/rust.md b/source/_posts/rust.md index 30c668f..b9e5920 100644 --- a/source/_posts/rust.md +++ b/source/_posts/rust.md @@ -412,9 +412,9 @@ let mut l = k; | Operator | Description | | -------------------- | --------------------------------------- | -| `k += l` | Add a value and assign, then k=9 | -| `k -= l` | Substrate a value and assign, then k=18 | -| `k /= l` | Divide a value and assign, then k=9 | +| `k += l` | Add a value and assign, then k=18 | +| `k -= l` | Subtract a value and assign, then k=0 | +| `k /= l` | Divide a value and assign, then k=1 | | `k *= l` | Multiply a value and assign, then k=81 | | k \|= l | Bitwise OR and assign, then k=89 |