diff --git a/src/xmpp/Response.hx b/src/xmpp/Response.hx index e9faef86..7b0d639d 100644 --- a/src/xmpp/Response.hx +++ b/src/xmpp/Response.hx @@ -23,13 +23,13 @@ abstract Response(EResponse) from EResponse to ERespons public var payload(get,never) : T; inline function get_payload() : T return switch this { case Result(r): r; - case Error(e): null; + case Error(_): null; } /** The error **/ public var error(get,never) : xmpp.Stanza.Error; inline function get_error() : xmpp.Stanza.Error return switch this { - case Result(r): null; + case Result(_): null; case Error(e): e; } @@ -38,7 +38,7 @@ abstract Response(EResponse) from EResponse to ERespons public var xmlns(get,never) : String; inline function get_xmlns() : String return switch this { case Result(r): r.get('xmlns'); - case Error(e): null; + case Error(_): null; } inline function new(r:Response) this = r; @@ -64,11 +64,11 @@ abstract Response(EResponse) from EResponse to ERespons case Result(r): r; case Error(e): e.toXML(); } - + @:to public inline function toOption():haxe.ds.Option return switch this { case Result(r): haxe.ds.Option.Some(r); - case Error(e): haxe.ds.Option.None; + case Error(_): haxe.ds.Option.None; } @:from public static inline function fromError(e:xmpp.Stanza.Error):Response