A websocket implementation for zig
0

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #100 from cztomsik/dev

use @splat() in place of already removed ** operator

authored by

Karl Seguin and committed by
GitHub
(May 23, 2026, 7:31 PM +0800) 7233b020 6d309f7a

+4 -4
+3 -3
src/websocket.zig
··· 58 58 } 59 59 60 60 { 61 - const msg = "A" ** 130; 61 + const msg = &@as([130]u8, @splat('A')); 62 62 const framed = frameText(msg); 63 63 64 64 try t.expectEqual(134, framed.len); ··· 87 87 } 88 88 89 89 { 90 - const msg = "A" ** 130; 91 - const framed = frameBin(msg); 90 + const msg = @as([130]u8, @splat('A')); 91 + const framed = frameBin(&msg); 92 92 93 93 try t.expectEqual(134, framed.len); 94 94
+1 -1
test_runner.zig
··· 4 4 5 5 const Allocator = std.mem.Allocator; 6 6 7 - const BORDER = "=" ** 80; 7 + const BORDER: [80]u8 = @splat('='); 8 8 9 9 pub const std_options = std.Options{ .log_scope_levels = &[_]std.log.ScopeLevel{ 10 10 .{ .scope = .websocket, .level = .warn },