Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore(core): remove unnecessary path prefix #2265

Merged
merged 2 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/layers/oteltrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ impl<R: oio::BlockingRead> oio::BlockingRead for OtelTraceWrapper<R> {
self.inner.read(buf)
}

fn seek(&mut self, pos: std::io::SeekFrom) -> Result<u64> {
fn seek(&mut self, pos: io::SeekFrom) -> Result<u64> {
self.inner.seek(pos)
}

Expand Down
4 changes: 2 additions & 2 deletions core/src/raw/oio/read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ impl<T: BlockingRead + ?Sized> BlockingRead for Box<T> {
}
}

impl std::io::Read for dyn BlockingRead {
impl io::Read for dyn BlockingRead {
#[inline]
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
let this: &mut dyn BlockingRead = &mut *self;
Expand All @@ -355,7 +355,7 @@ impl std::io::Read for dyn BlockingRead {
}
}

impl std::io::Seek for dyn BlockingRead {
impl io::Seek for dyn BlockingRead {
#[inline]
fn seek(&mut self, pos: io::SeekFrom) -> io::Result<u64> {
let this: &mut dyn BlockingRead = &mut *self;
Expand Down
12 changes: 6 additions & 6 deletions core/src/services/fs/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ impl FsBackend {

#[async_trait]
impl Accessor for FsBackend {
type Reader = oio::into_reader::FdReader<Compat<tokio::fs::File>>;
type Reader = oio::into_reader::FdReader<Compat<fs::File>>;
type BlockingReader = oio::into_blocking_reader::FdReader<std::fs::File>;
type Writer = FsWriter<tokio::fs::File>;
type Writer = FsWriter<fs::File>;
type BlockingWriter = FsWriter<std::fs::File>;
type Appender = ();
type Pager = Option<FsPager<tokio::fs::ReadDir>>;
type Pager = Option<FsPager<fs::ReadDir>>;
type BlockingPager = Option<FsPager<std::fs::ReadDir>>;

fn info(&self) -> AccessorInfo {
Expand Down Expand Up @@ -421,7 +421,7 @@ impl Accessor for FsBackend {
(p, None)
};

let f = tokio::fs::OpenOptions::new()
let f = fs::OpenOptions::new()
.create(true)
.truncate(true)
.write(true)
Expand Down Expand Up @@ -503,7 +503,7 @@ impl Accessor for FsBackend {

Ok(RpDelete::default())
}
Err(err) if err.kind() == std::io::ErrorKind::NotFound => Ok(RpDelete::default()),
Err(err) if err.kind() == io::ErrorKind::NotFound => Ok(RpDelete::default()),
Err(err) => Err(parse_io_error(err)),
}
}
Expand Down Expand Up @@ -688,7 +688,7 @@ impl Accessor for FsBackend {

Ok(RpDelete::default())
}
Err(err) if err.kind() == std::io::ErrorKind::NotFound => Ok(RpDelete::default()),
Err(err) if err.kind() == io::ErrorKind::NotFound => Ok(RpDelete::default()),
Err(err) => Err(parse_io_error(err)),
}
}
Expand Down