Skip to content

Comments

Fix struct update syntax deprecation warning elixir 1.19.0-dev#143

Merged
josevalim merged 1 commit intodashbitco:mainfrom
nwjlyons:fix-compiler-warnings
Apr 30, 2025
Merged

Fix struct update syntax deprecation warning elixir 1.19.0-dev#143
josevalim merged 1 commit intodashbitco:mainfrom
nwjlyons:fix-compiler-warnings

Conversation

@nwjlyons
Copy link
Contributor

Fixes

     warning: the struct update syntax is deprecated:

     %NimbleOptions.ValidationError{error | keys_path: path ++ error.keys_path}

     Instead, prefer to pattern matching on structs when the variable is first defined and use the regular map update syntax instead:

     %{error | keys_path: path ++ error.keys_path}

     │
 520 │         {:error, %ValidationError{error | keys_path: path ++ error.keys_path}}
     │                                  ~
     │
     └─ lib/nimble_options.ex:520:34

@josevalim josevalim merged commit c06eb38 into dashbitco:main Apr 30, 2025
0 of 2 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants