Skip to content

Commit

Permalink
refacotr: improved code, removed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
m62624 committed Jan 3, 2024
1 parent d56bc03 commit 240dfd4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/chunk/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ impl<R: AsyncRead + Unpin + Send> FilePack<R> {
}
}

type ChunkResult<R> = io::Result<(Chunk, FilePack<R>)>;
type Task<R> = JoinHandle<ChunkResult<R>>;

/// The `FileStream` provides an asynchronous file stream designed to read data chunks from a file.
///
/// It operates in two modes:
Expand All @@ -126,8 +129,7 @@ where
{
memory: Memory,
file: FilePack<R>,
current_task: Option<JoinHandle<io::Result<(Chunk, FilePack<R>)>>>,
// current_task: Option<JoinHandle<io::Result<(Chunk, FilePack<R>>>)>,
current_task: Option<Task<R>>,
}

impl FileStream<File> {
Expand Down

0 comments on commit 240dfd4

Please sign in to comment.