From 4c411b76cad9cc735687dc739d2e2db5d00e5eac Mon Sep 17 00:00:00 2001 From: Igor Tolmachev Date: Sun, 21 Jul 2024 16:59:14 +0900 Subject: Add AES encryption --- src/utils/cursor.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/utils/cursor.rs') 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 { } impl IoCursor { - pub fn new(mut io: Io, start: u64, end: u64) -> Result { - let cursor = io.seek(SeekFrom::Start(start))?; - Ok(Self { + pub fn new(io: Io, cursor: u64, end: u64) -> Self { + Self { io, cursor, bounds: (cursor, end), - }) + } } } -- cgit v1.2.3