time: move the nanosecond comparison before the rest in the Time == Time implementation

This commit is contained in:
Delyan Angelov 2025-09-05 19:28:29 +03:00
parent 083d3dba38
commit 21c46f4ae5
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -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