From 25c900f439f36c7ce21b7b9d542adfe6cb8d5d99 Mon Sep 17 00:00:00 2001 From: Swastik Baranwal Date: Mon, 18 Dec 2023 00:21:32 +0530 Subject: [PATCH] examples: minor refactor in the xvweb example (#20206) --- examples/xvweb/todo/main.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/xvweb/todo/main.v b/examples/xvweb/todo/main.v index 68c5b64a156790..5c4bd4b110434f 100644 --- a/examples/xvweb/todo/main.v +++ b/examples/xvweb/todo/main.v @@ -113,7 +113,7 @@ pub fn (app &App) delete_todo(mut ctx Context, id int) vweb.Result { // prevent hackers from deleting TODO's that are not completed ;) to_be_deleted := todos[0] - if to_be_deleted.completed == false { + if !to_be_deleted.completed { return ctx.request_error('You must first complete a TODO before you can delete it!') }