From 5bb2d45381fd09e237d01edc03d33102de2a8a8c Mon Sep 17 00:00:00 2001 From: Gabbi Fisher Date: Tue, 20 Aug 2019 12:56:49 -0700 Subject: [PATCH] remove unnecessary percent encoding --- src/commands/kv/write_bulk.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/commands/kv/write_bulk.rs b/src/commands/kv/write_bulk.rs index 5b709f680..e3406c4fb 100644 --- a/src/commands/kv/write_bulk.rs +++ b/src/commands/kv/write_bulk.rs @@ -1,7 +1,6 @@ extern crate base64; use cloudflare::framework::apiclient::ApiClient; -use percent_encoding::{percent_encode, PATH_SEGMENT_ENCODE_SET}; use walkdir::WalkDir; use std::ffi::OsString; @@ -102,9 +101,6 @@ fn generate_key(path: &Path, directory: &Path) -> Result "found a non-UTF-8 path, {:?}", path_with_forward_slash )); - let path_bytes = path.as_bytes(); - // we use PATH_SEGMENT_ENCODE_SET since we're encoding paths, this will turn / into %2F, - // which is needed for the API call to put a `/` into the key. - Ok(percent_encode(path_bytes, PATH_SEGMENT_ENCODE_SET).to_string()) + Ok(path.to_string()) }