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