Skip to content

Commit

Permalink
fix: address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Zhenchi <[email protected]>
  • Loading branch information
zhongzc committed Jul 4, 2024
1 parent 81ea1b6 commit ce0050d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/puffin/src/puffin_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub struct PutOptions {

/// The `PuffinReader` trait provides methods for reading blobs and directories from a Puffin file.
#[async_trait]
#[auto_impl::auto_impl(Box, Rc, Arc)]
#[auto_impl::auto_impl(Box, Arc)]
pub trait PuffinReader {
type Blob: BlobGuard;
type Dir: DirGuard;
Expand All @@ -92,15 +92,15 @@ pub trait PuffinReader {

/// `BlobGuard` is provided by the `PuffinReader` to access the blob data.
/// Users should hold the `BlobGuard` until they are done with the blob data.
#[auto_impl::auto_impl(Box, Rc, Arc)]
#[auto_impl::auto_impl(Box, Arc)]
pub trait BlobGuard {
type Reader: AsyncRead + AsyncSeek + Unpin;
fn reader(&self) -> BoxFuture<'static, Result<Self::Reader>>;
}

/// `DirGuard` is provided by the `PuffinReader` to access the directory in the filesystem.
/// Users should hold the `DirGuard` until they are done with the directory.
#[auto_impl::auto_impl(Box, Rc, Arc)]
#[auto_impl::auto_impl(Box, Arc)]
pub trait DirGuard {
fn path(&self) -> &PathBuf;
}
2 changes: 1 addition & 1 deletion src/puffin/src/puffin_manager/file_accessor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use crate::error::Result;

/// `PuffinFileAccessor` is for opening readers and writers for puffin files.
#[async_trait]
#[auto_impl::auto_impl(Box, Rc, Arc)]
#[auto_impl::auto_impl(Box, Arc)]
pub trait PuffinFileAccessor: Send + Sync + 'static {
type Reader: AsyncRead + AsyncSeek + Unpin + Send;
type Writer: AsyncWrite + Unpin + Send;
Expand Down
2 changes: 1 addition & 1 deletion src/puffin/src/puffin_manager/stager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub trait InitDirFn = Fn(DirWriterProviderRef) -> WriteResult;

/// `Stager` manages the staging area for the puffin files.
#[async_trait]
#[auto_impl::auto_impl(Box, Rc, Arc)]
#[auto_impl::auto_impl(Box, Arc)]
pub trait Stager: Send + Sync {
type Blob: BlobGuard;
type Dir: DirGuard;
Expand Down

0 comments on commit ce0050d

Please sign in to comment.