Skip to content

Commit

Permalink
Refactor: cargo fmt checks
Browse files Browse the repository at this point in the history
  • Loading branch information
sysu-yunz committed Sep 15, 2023
1 parent 491b397 commit cecd4a4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
11 changes: 4 additions & 7 deletions core/src/services/oss/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,13 +556,10 @@ impl Accessor for OssBackend {
v.if_none_match(),
v.override_content_disposition(),
)?,
PresignOperation::Write(v) => self.core.oss_put_object_request(
path,
None,
v,
AsyncBody::Empty,
true,
)?,
PresignOperation::Write(v) => {
self.core
.oss_put_object_request(path, None, v, AsyncBody::Empty, true)?
}
};

self.core.sign_query(&mut req, args.expire()).await?;
Expand Down
8 changes: 1 addition & 7 deletions core/src/services/oss/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,13 +377,7 @@ impl OssCore {
args: &OpWrite,
body: AsyncBody,
) -> Result<Response<IncomingAsyncBody>> {
let mut req = self.oss_put_object_request(
path,
size,
args,
body,
false,
)?;
let mut req = self.oss_put_object_request(path, size, args, body, false)?;

self.sign(&mut req).await?;
self.send(req).await
Expand Down
10 changes: 3 additions & 7 deletions core/src/services/oss/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,9 @@ impl OssWriter {
#[async_trait]
impl oio::MultipartUploadWrite for OssWriter {
async fn write_once(&self, size: u64, body: AsyncBody) -> Result<()> {
let mut req = self.core.oss_put_object_request(
&self.path,
Some(size),
&self.op,
body,
false,
)?;
let mut req =
self.core
.oss_put_object_request(&self.path, Some(size), &self.op, body, false)?;

self.core.sign(&mut req).await?;

Expand Down

0 comments on commit cecd4a4

Please sign in to comment.