From d8708a03dc39559a0d2291b924a1867f4f7a161c Mon Sep 17 00:00:00 2001 From: Devin Alexander Torres Date: Sun, 9 Jun 2024 07:43:44 -0500 Subject: [PATCH] Change Poison.encode argument name to `value` for consistency --- lib/poison.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/poison.ex b/lib/poison.ex index 381f29d..975f212 100644 --- a/lib/poison.ex +++ b/lib/poison.ex @@ -100,8 +100,8 @@ defmodule Poison do @spec decode(iodata) :: {:ok, Parser.t()} | {:error, ParseError.t() | DecodeError.t()} @spec decode(iodata, Decoder.options() | [Decoder.option()]) :: {:ok, Decoder.t()} | {:error, ParseError.t() | DecodeError.t()} - def decode(iodata, options \\ %{}) do - {:ok, decode!(iodata, options)} + def decode(value, options \\ %{}) do + {:ok, decode!(value, options)} rescue exception in [ParseError, DecodeError] -> {:error, exception}