diff options
author | Jasper Ras <jras@hostnet.nl> | 2025-08-03 22:29:47 +0200 |
---|---|---|
committer | Jasper Ras <jras@hostnet.nl> | 2025-08-03 22:29:47 +0200 |
commit | 931eb0894e7cd3717f1218f0eb06382b11734c13 (patch) | |
tree | b6ad9b0d98a8f26e496c91ad3f24d1c855b654df /Why is it called destructuring.md | |
parent | af98004d2cf437603f47f4224110a80d76d0d7de (diff) |
vault backup: 2025-08-03 22:29:47
Diffstat (limited to 'Why is it called destructuring.md')
-rw-r--r-- | Why is it called destructuring.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Why is it called destructuring.md b/Why is it called destructuring.md new file mode 100644 index 0000000..6f8945c --- /dev/null +++ b/Why is it called destructuring.md @@ -0,0 +1,8 @@ +[[Rust]] + +Destructuring is binding each value in a compound type to a name. It is called destructuring because we break the compound element into individual elements. + +```rust +let tup = (1, 2, 3); +let (a, b, c) = tup; +``` |