Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
wcy-fdu committed Feb 18, 2024
1 parent 8fd8256 commit 1269eea
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ reqwest = { version = "0.11.18", features = [
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1.27", features = ["sync"] }
url = "2.5.0"
uuid = { version = "1", features = ["serde", "v4"] }

# Test only dependencies
Expand Down
7 changes: 3 additions & 4 deletions core/src/services/azblob/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ use std::fmt::Debug;
use std::fmt::Formatter;
use std::fmt::Write;
use std::time::Duration;
use url::form_urlencoded::byte_serialize;
use uuid::Uuid;

use crate::raw::*;
Expand Down Expand Up @@ -385,8 +384,9 @@ impl AzblobCore {
// To be written as part of a blob, a block must have been successfully written to the server in an earlier Put Block operation.
// refer to https://learn.microsoft.com/en-us/rest/api/storageservices/put-block?tabs=microsoft-entra-id
let p = build_abs_path(&self.root, path);

let encoded_block_id: String =
byte_serialize(BASE64_STANDARD.encode(block_id.to_string()).as_bytes()).collect();
percent_encode_path(&BASE64_STANDARD.encode(block_id.simple().to_string()));
let url = format!(
"{}/{}/{}?comp=block&blockid={}",
self.endpoint,
Expand Down Expand Up @@ -455,8 +455,7 @@ impl AzblobCore {
.into_iter()
.map(|block_id| {
let encoded_block_id: String =
byte_serialize(BASE64_STANDARD.encode(block_id.to_string()).as_bytes())
.collect();
percent_encode_path(&BASE64_STANDARD.encode(block_id.simple().to_string()));
encoded_block_id
})
.collect(),
Expand Down

0 comments on commit 1269eea

Please sign in to comment.