refactor: use explicit error sets in MessageFilter and project_manager

This commit is contained in:
CJ van den Berg 2024-09-19 21:54:18 +02:00
parent 6fac0b1cb4
commit 0542fdc680
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
12 changed files with 396 additions and 341 deletions

View file

@ -1,5 +1,6 @@
const std = @import("std");
const tp = @import("thespian");
const cbor = @import("cbor");
const zeit = @import("zeit");
const Plane = @import("renderer").Plane;
@ -67,8 +68,8 @@ pub fn render(self: *Self, theme: *const Widget.Theme) bool {
return false;
}
fn receive_tick(self: *Self, _: tp.pid_ref, m: tp.message) error{Exit}!bool {
if (try m.match(.{"CLOCK"})) {
fn receive_tick(self: *Self, _: tp.pid_ref, m: tp.message) MessageFilter.Error!bool {
if (try cbor.match(m.buf, .{"CLOCK"})) {
tui.need_render();
self.update_tick_timer(.ticked);
return true;