From b4601de5a4f1f3f1c3bda2f9cd6bef6a94f75782 Mon Sep 17 00:00:00 2001 From: CAIMEOX <1853884864@qq.com> Date: Wed, 20 Mar 2024 12:40:55 +0800 Subject: [PATCH] remove unnecessary `return` --- queue/queue.mbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/queue/queue.mbt b/queue/queue.mbt index fa36998d4..68f64c2c6 100644 --- a/queue/queue.mbt +++ b/queue/queue.mbt @@ -69,7 +69,7 @@ pub fn op_equal[T : Eq](self : Cell[T], other : Cell[T]) -> Bool { Nil, Nil => true Cons({ content: x, next: xs }), Cons({ content: y, next: ys }) => { if x != y { - return false + break false } continue xs, ys } @@ -284,7 +284,7 @@ pub fn iter[T](self : Queue[T], f : (T) -> Unit) -> Unit { f(content) continue next } - Nil => return + Nil => () } }