Skip to content

Commit b1f2ff5

Browse files
committed
Remove unnecessary conversions.
1 parent 53eef15 commit b1f2ff5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

time.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ func (f TimeFormat) Decode(v any) (time.Time, error) {
183183
case float64:
184184
return time.UnixMilli(int64(math.Floor(v))).UTC(), nil
185185
case int64:
186-
return time.UnixMilli(int64(v)).UTC(), nil
186+
return time.UnixMilli(v).UTC(), nil
187187
default:
188188
return time.Time{}, util.TimeErr
189189
}
@@ -200,7 +200,7 @@ func (f TimeFormat) Decode(v any) (time.Time, error) {
200200
case float64:
201201
return time.UnixMicro(int64(math.Floor(v))).UTC(), nil
202202
case int64:
203-
return time.UnixMicro(int64(v)).UTC(), nil
203+
return time.UnixMicro(v).UTC(), nil
204204
default:
205205
return time.Time{}, util.TimeErr
206206
}
@@ -217,7 +217,7 @@ func (f TimeFormat) Decode(v any) (time.Time, error) {
217217
case float64:
218218
return time.Unix(0, int64(math.Floor(v))).UTC(), nil
219219
case int64:
220-
return time.Unix(0, int64(v)).UTC(), nil
220+
return time.Unix(0, v).UTC(), nil
221221
default:
222222
return time.Time{}, util.TimeErr
223223
}

vtab_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,5 @@ func (cur *seriesCursor) EOF() bool {
116116
}
117117

118118
func (cur *seriesCursor) RowID() (int64, error) {
119-
return int64(cur.value), nil
119+
return cur.value, nil
120120
}

0 commit comments

Comments
 (0)