From 458261508af66fa971207c8af10ee4e1b59fbf2f Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Tue, 19 Nov 2024 14:30:13 +0200 Subject: [PATCH] fix compilation with latest V (#18) --- src/eventcontroller.v | 2 +- src/gateway.v | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/eventcontroller.v b/src/eventcontroller.v index d56955c..d6d7615 100644 --- a/src/eventcontroller.v +++ b/src/eventcontroller.v @@ -47,7 +47,7 @@ pub fn (mut ec EventController[T]) emit(e T, options EmitOptions) { for _, w in ec.wait_fors { mut b := false if w.check != none { - c := w.check or { panic('corrupted') } + c := w.check b = c(e) } else { b = true diff --git a/src/gateway.v b/src/gateway.v index b8082d4..36c5b8a 100644 --- a/src/gateway.v +++ b/src/gateway.v @@ -153,7 +153,7 @@ pub: properties Properties large_threshold ?int gateway_url string = 'wss://gateway.discord.gg' - log log.Logger + log &log.Logger = unsafe { log.get_logger() } rest REST token string mut: