From 577095e2f7673e878b5976ea71a911cdbcbc0321 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 25 Nov 2021 11:48:52 +0100 Subject: [PATCH] move pbs-tools/src/percent_encoding.rs to pbs-api-types/src/percent_encoding.rs Signed-off-by: Dietmar Maurer --- pbs-api-types/Cargo.toml | 1 + pbs-api-types/src/lib.rs | 1 + {pbs-tools => pbs-api-types}/src/percent_encoding.rs | 0 pbs-client/src/http_client.rs | 2 +- pbs-client/src/task_log.rs | 2 +- pbs-tools/src/lib.rs | 1 - proxmox-backup-client/src/task.rs | 2 +- src/bin/proxmox-backup-manager.rs | 2 +- 8 files changed, 6 insertions(+), 5 deletions(-) rename {pbs-tools => pbs-api-types}/src/percent_encoding.rs (100%) diff --git a/pbs-api-types/Cargo.toml b/pbs-api-types/Cargo.toml index 3bee23ba..cd5dc129 100644 --- a/pbs-api-types/Cargo.toml +++ b/pbs-api-types/Cargo.toml @@ -12,6 +12,7 @@ lazy_static = "1.4" libc = "0.2" nix = "0.19.1" openssl = "0.10" +percent-encoding = "2.1" regex = "1.2" serde = { version = "1.0", features = ["derive"] } diff --git a/pbs-api-types/src/lib.rs b/pbs-api-types/src/lib.rs index bb5d152f..2ecd5170 100644 --- a/pbs-api-types/src/lib.rs +++ b/pbs-api-types/src/lib.rs @@ -4,6 +4,7 @@ use serde::{Deserialize, Serialize}; use anyhow::bail; pub mod common_regex; +pub mod percent_encoding; use proxmox_schema::{ api, const_regex, ApiStringFormat, ApiType, ArraySchema, Schema, StringSchema, ReturnType, diff --git a/pbs-tools/src/percent_encoding.rs b/pbs-api-types/src/percent_encoding.rs similarity index 100% rename from pbs-tools/src/percent_encoding.rs rename to pbs-api-types/src/percent_encoding.rs diff --git a/pbs-client/src/http_client.rs b/pbs-client/src/http_client.rs index 30099b38..046a7b17 100644 --- a/pbs-client/src/http_client.rs +++ b/pbs-client/src/http_client.rs @@ -23,9 +23,9 @@ use proxmox_http::uri::build_authority; use proxmox_async::broadcast_future::BroadcastFuture; use pbs_api_types::{Authid, Userid, RateLimitConfig}; +use pbs_api_types::percent_encoding::DEFAULT_ENCODE_SET; use pbs_tools::json::json_object_to_query; use pbs_tools::ticket; -use pbs_tools::percent_encoding::DEFAULT_ENCODE_SET; use super::pipe_to_stream::PipeToSendStream; use super::PROXMOX_BACKUP_TCP_KEEPALIVE_TIME; diff --git a/pbs-client/src/task_log.rs b/pbs-client/src/task_log.rs index e8874619..e607829a 100644 --- a/pbs-client/src/task_log.rs +++ b/pbs-client/src/task_log.rs @@ -7,7 +7,7 @@ use futures::*; use proxmox_router::cli::format_and_print_result; -use pbs_tools::percent_encoding::percent_encode_component; +use pbs_api_types::percent_encoding::percent_encode_component; use super::HttpClient; diff --git a/pbs-tools/src/lib.rs b/pbs-tools/src/lib.rs index 11c8171c..857efcb7 100644 --- a/pbs-tools/src/lib.rs +++ b/pbs-tools/src/lib.rs @@ -5,7 +5,6 @@ pub mod io; pub mod json; pub mod lru_cache; pub mod nom; -pub mod percent_encoding; pub mod sha; pub mod sync; pub mod ticket; diff --git a/proxmox-backup-client/src/task.rs b/proxmox-backup-client/src/task.rs index 5d83a988..f879d057 100644 --- a/proxmox-backup-client/src/task.rs +++ b/proxmox-backup-client/src/task.rs @@ -5,7 +5,7 @@ use proxmox_schema::api; use proxmox_router::cli::*; use pbs_client::display_task_log; -use pbs_tools::percent_encoding::percent_encode_component; +use pbs_api_types::percent_encoding::percent_encode_component; use pbs_tools::json::required_string_param; use pbs_api_types::UPID; diff --git a/src/bin/proxmox-backup-manager.rs b/src/bin/proxmox-backup-manager.rs index 4a055032..0867ce45 100644 --- a/src/bin/proxmox-backup-manager.rs +++ b/src/bin/proxmox-backup-manager.rs @@ -10,8 +10,8 @@ use proxmox_schema::api; use pbs_client::{display_task_log, view_task_result}; use pbs_config::sync; -use pbs_tools::percent_encoding::percent_encode_component; use pbs_tools::json::required_string_param; +use pbs_api_types::percent_encoding::percent_encode_component; use pbs_api_types::{ GroupFilter, SyncJobConfig, DATASTORE_SCHEMA, GROUP_FILTER_LIST_SCHEMA, IGNORE_VERIFIED_BACKUPS_SCHEMA, REMOTE_ID_SCHEMA,