From fdb0a398b1570fcce10c873b49b9c82b6cb7ad1c Mon Sep 17 00:00:00 2001 From: Nicole L Date: Thu, 27 Feb 2025 12:31:56 -0800 Subject: [PATCH] Add note about struct field defaults (#2666) --- src/user-defined-types/named-structs.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/user-defined-types/named-structs.md b/src/user-defined-types/named-structs.md index 5982fa35..00732c11 100644 --- a/src/user-defined-types/named-structs.md +++ b/src/user-defined-types/named-structs.md @@ -53,6 +53,8 @@ Key Points: not important. - If you already have variables with the right names, then you can create the struct using a shorthand. +- Struct fields do not support default values. Default values are specified by + implementing the `Default` trait which we will cover later. ## More to Explore