mirror of
https://github.com/vlang/v.git
synced 2025-09-23 04:18:48 -04:00
time: move the nanosecond comparison before the rest in the Time == Time implementation
This commit is contained in:
parent
083d3dba38
commit
21c46f4ae5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user