From 145f279b42c6d29d29a6fd9de4d24b3d65c1eabe Mon Sep 17 00:00:00 2001 From: Vladimir Panteleev Date: Mon, 26 Jun 2017 07:40:36 +0000 Subject: [PATCH] std.json: Remove unused error parameter to appendJSONChar --- std/json.d | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/std/json.d b/std/json.d index 79c79bb70..7e829d2fa 100644 --- a/std/json.d +++ b/std/json.d @@ -835,7 +835,7 @@ if (isInputRange!T && !isInfinite!T && isSomeChar!(ElementEncodingType!T)) default: auto c = getChar(); - appendJSONChar(str, c, options, &error); + appendJSONChar(str, c, options); goto Next; } @@ -1113,8 +1113,7 @@ string toJSON(const ref JSONValue root, in bool pretty = false, in JSONOptions o case '\r': json.put("\\r"); break; case '\t': json.put("\\t"); break; default: - appendJSONChar(json, c, options, - (msg) { throw new JSONException(msg); }); + appendJSONChar(json, c, options); } } @@ -1281,8 +1280,7 @@ string toJSON(const ref JSONValue root, in bool pretty = false, in JSONOptions o return json.data; } -private void appendJSONChar(ref Appender!string dst, dchar c, JSONOptions opts, - scope void delegate(string) error) @safe +private void appendJSONChar(ref Appender!string dst, dchar c, JSONOptions opts) @safe { import std.uni : isControl;