From 119c349bd23f0611689697d14eb7e426f7552f0b Mon Sep 17 00:00:00 2001 From: wolfgang Date: Thu, 30 Oct 2025 21:26:19 +0800 Subject: [PATCH] fix: struct example updating age --- lib/elixir/pages/getting-started/structs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/elixir/pages/getting-started/structs.md b/lib/elixir/pages/getting-started/structs.md index ff817819b0d..ac71fa8503a 100644 --- a/lib/elixir/pages/getting-started/structs.md +++ b/lib/elixir/pages/getting-started/structs.md @@ -86,7 +86,7 @@ iex> john = %User{name: "John", age: 27} iex> updates = [name: "Jane", age: 30] [name: "Jane", age: 30] iex> struct!(john, updates) -%User{age: 27, name: "Jane"} +%User{age: 30, name: "Jane"} ``` `struct!/2` will raise an error if you try to set invalid fields: