Skip to content

Commit

Permalink
Release 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtimberlake committed Oct 31, 2024
1 parent 7e6ffd1 commit 60f103c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ See the [docs](https://hexdocs.pm/shorthand) for more examples

## Structs

| Shorthand | Equivalent Elixir |
| ------------------------ | ------------------------------- |
| `st(MyStruct, foo, bar)` | `%MyStruct{foo: foo, bar: bar}` |
| Shorthand | Equivalent Elixir |
| ------------------------------------------------ | ----------------------------------------------------------------- |
| `st(MyStruct, foo, bar)` | `%MyStruct{foo: foo, bar: bar}` |
| `st(MyStruct, foo, _bar, ^baz)` | `%MyStruct{foo: foo, bar: _bar, baz: ^baz}` |
| `st(MyStruct, foo, bar, baz: st(MyStruct, qux))` | `%MyStruct{foo: foo, bar: bar, baz: %MyStruct{qux: qux}}` |
| `st(MyStruct, foo, m(baz) = bar, qux: m(quux))` | `%MyStruct{foo: foo, bar: %{baz: baz} = bar, qux: %{quux: quux}}` |
| `st(MyStruct, foo, bar = m(baz), qux: m(quux))` | `%MyStruct{foo: foo, bar: %{baz: baz} = bar, qux: %{quux: quux}}` |
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Shorthand.MixProject do
use Mix.Project

@version "1.1.0"
@version "1.2.0"
@github_url "https://github.com/andrewtimberlake/shorthand"

def project do
Expand Down

0 comments on commit 60f103c

Please sign in to comment.