statistics: fix a remarkably bungled wrapper

keyboards are hard.
This commit is contained in:
torque 2023-08-23 22:18:03 -07:00
parent b101e0acd2
commit 3816f32101
Signed by: torque
SSH Key Fingerprint: SHA256:nCrXefBNo6EbjNSQhv0nXmEg/VuNq3sMF5b8zETw3Tk

View File

@ -29,14 +29,14 @@ pub const Statistics = opaque {
pub fn getCounts(self: *Statistics) Error!StatsCounts {
var counts: StatsCounts = .{};
const status = Status.fromInt(nats_c.natsStatistics_GetCounts)(
self,
const status = Status.fromInt(nats_c.natsStatistics_GetCounts(
@ptrCast(self),
&counts.messages_in,
&counts.bytes_in,
&counts.messages_out,
&counts.bytes_out,
&counts.reconnects,
);
));
return status.toError() orelse counts;
}
};