Skip to content

Commit

Permalink
chore: rename AsyncFile::to_file to AsyncFile::boxed
Browse files Browse the repository at this point in the history
  • Loading branch information
ethe committed Jul 17, 2024
1 parent 7bf3313 commit 69b5cd2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/fs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub enum FileType {
}

pub trait AsyncFile: AsyncRead + AsyncWrite + AsyncSeek + Send + Sync + Unpin + 'static {
fn to_file(self) -> Box<dyn AsyncFile>
fn boxed(self) -> Box<dyn AsyncFile>
where
Self: Sized,
{
Expand Down
2 changes: 1 addition & 1 deletion src/ondisk/sstable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ mod tests {
let file = TokioExecutor::open(&temp_dir.path().join("test.parquet"))
.await
.unwrap()
.to_file();
.boxed();
let mut sstable = SsTable::<Test>::open(file);

sstable.write(record_batch).await.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions src/version/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ where
let file = E::open(self.option.table_path(gen))
.await
.map_err(VersionError::Io)?
.to_file();
.boxed();
let table = SsTable::open(file);
table.get(key).await.map_err(VersionError::Parquet)
}
Expand All @@ -124,7 +124,7 @@ where
let file = E::open(self.option.table_path(&scope.gen))
.await
.map_err(VersionError::Io)?
.to_file();
.boxed();
let table = SsTable::open(file);

iters.push(ScanStream::SsTable {
Expand Down

0 comments on commit 69b5cd2

Please sign in to comment.