Skip to content

Commit

Permalink
refacor(services/fs): Make normalized path check optional (#1242)
Browse files Browse the repository at this point in the history
* Remove not needed benches

Signed-off-by: Xuanwo <[email protected]>

* refacor(services/fs): Make normalized path check optional

Signed-off-by: Xuanwo <[email protected]>

---------

Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo authored Jan 28, 2023
1 parent c87bf68 commit 3066afc
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 274 deletions.
9 changes: 0 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,6 @@ name = "ops"
harness = false
name = "io"

[[bench]]
harness = false
name = "path"

[[bench]]
harness = false
name = "layers"
required-features = ["layers-all"]

[[example]]
name = "hdfs"
required-features = ["services-hdfs"]
Expand Down
95 changes: 0 additions & 95 deletions benches/layers.rs

This file was deleted.

53 changes: 0 additions & 53 deletions benches/path.rs

This file was deleted.

5 changes: 0 additions & 5 deletions src/raw/io/output/into_blocking_reader/from_fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ where
"invalid seek to a negative or overflowing position",
)),
Some(n) => {
// Ignore seek operation if we are already on start.
if self.offset == n as u64 {
return Ok(self.offset - self.start);
}

let cur = self.inner.seek(SeekFrom::Start(n as u64))?;

self.offset = cur;
Expand Down
5 changes: 0 additions & 5 deletions src/raw/io/output/into_reader/from_fd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,6 @@ where
"invalid seek to a negative or overflowing position",
))),
Some(n) => {
// Ignore seek operation if we are already on start.
if self.offset == n as u64 {
return Poll::Ready(Ok(self.offset - self.start));
}

let cur =
ready!(Pin::new(&mut self.inner).poll_seek(cx, SeekFrom::Start(n as u64)))?;

Expand Down
Loading

1 comment on commit 3066afc

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for opendal ready!

✅ Preview
https://opendal-c1hdikfaj-databend.vercel.app

Built with commit 3066afc.
This pull request is being automatically deployed with vercel-action

Please sign in to comment.