diff options
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/cursor.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/utils/cursor.rs b/src/utils/cursor.rs index 91d44f8..ee80474 100644 --- a/src/utils/cursor.rs +++ b/src/utils/cursor.rs | |||
| @@ -7,13 +7,12 @@ pub struct IoCursor<Io> { | |||
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | impl<Io: Seek> IoCursor<Io> { | 9 | impl<Io: Seek> IoCursor<Io> { |
| 10 | pub fn new(mut io: Io, start: u64, end: u64) -> Result<Self> { | 10 | pub fn new(io: Io, cursor: u64, end: u64) -> Self { |
| 11 | let cursor = io.seek(SeekFrom::Start(start))?; | 11 | Self { |
| 12 | Ok(Self { | ||
| 13 | io, | 12 | io, |
| 14 | cursor, | 13 | cursor, |
| 15 | bounds: (cursor, end), | 14 | bounds: (cursor, end), |
| 16 | }) | 15 | } |
| 17 | } | 16 | } |
| 18 | } | 17 | } |
| 19 | 18 | ||
