summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2025-04-28 07:34:45 -0400
committerRobby Zambito <contact@robbyzambito.me>2025-05-10 21:46:53 -0400
commit775212013fd96b7df2a3cbb11971597f13710182 (patch)
treee1bdc8291dffa11593d810b282f8074df695252c
parent339ac5cfe5169b005f9a0af5052d4d78dc6fdb76 (diff)
-rw-r--r--src/message.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/message.zig b/src/message.zig
index efeea29..01eb72c 100644
--- a/src/message.zig
+++ b/src/message.zig
@@ -82,7 +82,11 @@ test "testing variable length zero copy struct" {
zcm.type = .relay;
zcm.length = 3;
std.debug.print("{any}\n", .{zcm});
- std.debug.print("{any}\n", .{zcm.getSaprusTypePayload()});
+ std.debug.print("{any}\n", .{(try zcm.getSaprusTypePayload()).relay});
+ if (false) {
+ // Illegal behavior
+ std.debug.print("{any}\n", .{(try zcm.getSaprusTypePayload()).connection});
+ }
if (false) {
std.debug.print("{any}\n", .{zcm.getRelay()});
std.debug.print("{any}\n", .{zcm.getConnection()});