From 726838cfff3a66e276f01d66add0f000f9aafb52 Mon Sep 17 00:00:00 2001 From: alisdair sullivan Date: Tue, 29 Nov 2011 21:11:17 -0800 Subject: [PATCH] removes overly restrictive guards --- src/jsx_to_json.erl | 3 +-- src/jsx_to_term.erl | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/jsx_to_json.erl b/src/jsx_to_json.erl index 3924bb6..30c6ffd 100644 --- a/src/jsx_to_json.erl +++ b/src/jsx_to_json.erl @@ -38,8 +38,7 @@ -spec to_json(Source::(binary() | list()), Opts::opts()) -> binary(). -to_json(Source, Opts) when (is_binary(Source) andalso is_list(Opts)) - orelse (is_list(Source) andalso is_list(Opts)) -> +to_json(Source, Opts) when is_list(Opts) -> (gen_json:parser(?MODULE, Opts, jsx_utils:extract_opts(Opts)))(Source). diff --git a/src/jsx_to_term.erl b/src/jsx_to_term.erl index c43df50..35b93ad 100644 --- a/src/jsx_to_term.erl +++ b/src/jsx_to_term.erl @@ -36,8 +36,7 @@ -spec to_term(Source::(binary() | list()), Opts::opts()) -> binary(). -to_term(Source, Opts) when (is_binary(Source) andalso is_list(Opts)) - orelse (is_list(Source) andalso is_list(Opts)) -> +to_term(Source, Opts) when is_list(Opts) -> (gen_json:parser(?MODULE, Opts, jsx_utils:extract_opts(Opts)))(Source).