From 931eb0894e7cd3717f1218f0eb06382b11734c13 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Sun, 3 Aug 2025 22:29:47 +0200 Subject: vault backup: 2025-08-03 22:29:47 --- Why is it called destructuring.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Why is it called destructuring.md (limited to 'Why is it called destructuring.md') 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; +``` -- cgit v1.2.3