From 21c46f4ae5132ef01ded0b9eda90d25e08a01bca Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 5 Sep 2025 19:28:29 +0300 Subject: [PATCH] time: move the nanosecond comparison before the rest in the Time == Time implementation --- vlib/time/operator.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/time/operator.v b/vlib/time/operator.v index 8242e3444e..66dcdb0bd4 100644 --- a/vlib/time/operator.v +++ b/vlib/time/operator.v @@ -3,8 +3,8 @@ module time // operator `==` returns true if provided time is equal to time @[inline] pub fn (t1 Time) == (t2 Time) bool { - return t1.is_local == t2.is_local && t1.local_unix() == t2.local_unix() - && t1.nanosecond == t2.nanosecond + return t1.nanosecond == t2.nanosecond && t1.is_local == t2.is_local + && t1.local_unix() == t2.local_unix() } // operator `<` returns true if provided time is less than time