std.json: Remove unused error parameter to appendJSONChar

This commit is contained in:
Vladimir Panteleev 2017-06-26 07:40:36 +00:00
parent e59ce88531
commit 145f279b42

View file

@ -835,7 +835,7 @@ if (isInputRange!T && !isInfinite!T && isSomeChar!(ElementEncodingType!T))
default: default:
auto c = getChar(); auto c = getChar();
appendJSONChar(str, c, options, &error); appendJSONChar(str, c, options);
goto Next; 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 '\r': json.put("\\r"); break;
case '\t': json.put("\\t"); break; case '\t': json.put("\\t"); break;
default: default:
appendJSONChar(json, c, options, appendJSONChar(json, c, options);
(msg) { throw new JSONException(msg); });
} }
} }
@ -1281,8 +1280,7 @@ string toJSON(const ref JSONValue root, in bool pretty = false, in JSONOptions o
return json.data; return json.data;
} }
private void appendJSONChar(ref Appender!string dst, dchar c, JSONOptions opts, private void appendJSONChar(ref Appender!string dst, dchar c, JSONOptions opts) @safe
scope void delegate(string) error) @safe
{ {
import std.uni : isControl; import std.uni : isControl;