From 1c2038625238fae401f2aadc69edc79fb811b80c Mon Sep 17 00:00:00 2001 From: zambal Date: Thu, 20 Feb 2014 16:06:44 +0100 Subject: [PATCH] A couple of small type spec fixes --- lib/json/encoder.ex | 2 +- lib/json/parser.ex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/json/encoder.ex b/lib/json/encoder.ex index 7cc34ed..5e73b75 100644 --- a/lib/json/encoder.ex +++ b/lib/json/encoder.ex @@ -7,7 +7,7 @@ # 0. You just DO WHAT THE FUCK YOU WANT TO. defmodule JSON.Encode do - @spec it(term, Keyword.t) :: String.t + @spec it(term, Keyword.t) :: { :ok, String.t } def it(data, options \\ []) do case JSON.Encoder.to_json(data, options) do { encode } when encode |> is_binary -> diff --git a/lib/json/parser.ex b/lib/json/parser.ex index a4d6e7e..3bfb73a 100644 --- a/lib/json/parser.ex +++ b/lib/json/parser.ex @@ -36,7 +36,7 @@ defmodule JSON.Parser do { :error, :invalid, token } end - @spec parse(String.t) :: t + @spec parse!(String.t) :: t def parse!(string) do case parse(string) do { :ok, value } ->