| ... | ... | @@ -301,7 +301,6 @@ pub const File = struct { |
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | pub const GetSeekPosError = error{ |
| 304 | | Overflow, |
| 305 | 304 | SystemResources, |
| 306 | 305 | Unseekable, |
| 307 | 306 | Unexpected, |
| ... | ... | @@ -324,7 +323,7 @@ pub const File = struct { |
| 324 | 323 | else => os.unexpectedErrorPosix(err), |
| 325 | 324 | }; |
| 326 | 325 | } |
| 327 | | return @intCast(u64, result); |
| 326 | return u64(result); |
| 328 | 327 | }, |
| 329 | 328 | Os.windows => { |
| 330 | 329 | var pos: windows.LARGE_INTEGER = undefined; |
| ... | ... | @@ -336,8 +335,7 @@ pub const File = struct { |
| 336 | 335 | }; |
| 337 | 336 | } |
| 338 | 337 | |
| 339 | | assert(pos >= 0); |
| 340 | | return math.cast(u64, pos); |
| 338 | return @intCast(u64, pos); |
| 341 | 339 | }, |
| 342 | 340 | else => @compileError("unsupported OS"), |
| 343 | 341 | } |
| ... | ... | @@ -355,8 +353,6 @@ pub const File = struct { |
| 355 | 353 | else => os.unexpectedErrorWindows(err), |
| 356 | 354 | }; |
| 357 | 355 | } |
| 358 | | if (file_size < 0) |
| 359 | | return error.Overflow; |
| 360 | 356 | return @intCast(u64, file_size); |
| 361 | 357 | } else { |
| 362 | 358 | @compileError("TODO support getEndPos on this OS"); |