Hi,
I find myself doing something like this, mostly in tests:
{:ok, new_time} = Time.new(15, 00, 00)
valid_attrs = %{
body: "some body",
time: new_time
}
I wonder if it’s ok to extract the tuple value like this
valid_attrs = %{
body: "some body",
time: Time.new(15, 00, 00) |> elem(1)
}
I know I can do that, the question is whether I should be doing that this way? Thank you