const eql = std.mem.eql;
const ArrayList = std.ArrayList;
const test_allocator = std.testing.allocator;
test "arraylist" {
var list = ArrayList(u8).init(test_allocator);
defer list.deinit();
try list.append('H');
try list.append('e');
try list.append('l');
try list.append('l');
try list.append('o');
try list.appendSlice(" World!");
try expect(eql(u8, list.items, "Hello World!"));
}
defer
and undefined
are great thoughSDL_HINT_MAC_OPENGL_SYNC_DISPATCH=1
?SDL_MAC_OPENGL_ASYNC_DISPATCH=1
#if defined(CONF_PLATFORM_MACOS) && defined(SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH)
// Hints will not be set if there is an existing override hint or environment variable that takes precedence.
// So this respects cli environment overrides.
SDL_SetHint(SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH, "1");
#endif
SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH
a preprocessor constant?from: Ryozuki#2188 rust
DDNet "connect $(mapname=Multeasymap;curl https://master1.ddnet.org/ddnet/15/servers.json | jq -r "[.servers[] | select(.info.map.name == \"$mapname\")] | sort_by(.info.clients | length) | .[-1].addresses[0]" | cut -d'/' -f3)"