style: format code

This commit is contained in:
2026-07-13 22:41:32 +03:00
parent b24c71678e
commit 0b24c03068
207 changed files with 7639 additions and 7816 deletions

View File

@@ -5,16 +5,15 @@ import haxe.io.BytesOutput;
import protohx.Message;
class PacketUtil {
public static function fromBytes<P:Message>(bytes:Bytes, factory:Class<P>):P {
var packet:P = Type.createInstance(factory, []);
packet.mergeFrom(bytes);
return packet;
}
public static function fromBytes<P:Message>(bytes:Bytes, factory:Class<P>):P {
var packet:P = Type.createInstance(factory, []);
packet.mergeFrom(bytes);
return packet;
}
public static function toBytes<P:Message>(packet:P):Bytes {
var out = new BytesOutput();
packet.writeTo(out);
return out.getBytes();
}
public static function toBytes<P:Message>(packet:P):Bytes {
var out = new BytesOutput();
packet.writeTo(out);
return out.getBytes();
}
}