From 12280219cbb345011b3e277a327baf8b33f06271 Mon Sep 17 00:00:00 2001 From: copygirl Date: Wed, 6 Mar 2024 19:20:56 +0100 Subject: [PATCH] Change World.enableRest to only take port --- src/world.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/world.zig b/src/world.zig index 4e0e8e2..6ee7ba2 100644 --- a/src/world.zig +++ b/src/world.zig @@ -49,8 +49,8 @@ pub fn World(comptime ctx: anytype) type { flecszigble.allocator.destroy(self); } - pub fn enableRest(self: *Self, options: struct { port: u16 = 0, addr: ?[:0]const u8 = null }) !void { - try self.set(flecs.rest.Rest, .{ .port = options.port, .ipaddr = @constCast(options.addr) }); + pub fn enableRest(self: *Self, port: u16) !void { + try self.set(flecs.rest.Rest, .{ .port = port }); } pub fn progress(self: *Self, delta_time: f32) bool { @@ -297,7 +297,7 @@ test "World REST API" { flecszigble.init(alloc); var world = try World(void).init(); defer world.deinit(); - try world.enableRest(.{ .port = 42666 }); + try world.enableRest(42666); const Runner = struct { pub fn run(w: *World(void)) void {