[pbs-devel] [PATCH proxmox-backup v2 06/16] move src/tools/compression.rs to proxmox-rest-server crate

Dietmar Maurer dietmar at proxmox.com
Tue Sep 21 07:58:44 CEST 2021


---
 {src/tools => proxmox-rest-server/src}/compression.rs | 0
 proxmox-rest-server/src/lib.rs                        | 3 +++
 src/server/rest.rs                                    | 8 +++++---
 src/tools/mod.rs                                      | 1 -
 4 files changed, 8 insertions(+), 4 deletions(-)
 rename {src/tools => proxmox-rest-server/src}/compression.rs (100%)

diff --git a/src/tools/compression.rs b/proxmox-rest-server/src/compression.rs
similarity index 100%
rename from src/tools/compression.rs
rename to proxmox-rest-server/src/compression.rs
diff --git a/proxmox-rest-server/src/lib.rs b/proxmox-rest-server/src/lib.rs
index bc8334ba..069d80b4 100644
--- a/proxmox-rest-server/src/lib.rs
+++ b/proxmox-rest-server/src/lib.rs
@@ -4,6 +4,9 @@ use anyhow::{bail, format_err, Error};
 
 use proxmox::tools::fd::Fd;
 
+mod compression;
+pub use compression::*;
+
 pub mod daemon;
 pub mod formatter;
 
diff --git a/src/server/rest.rs b/src/server/rest.rs
index 8beecb55..7e2e645c 100644
--- a/src/server/rest.rs
+++ b/src/server/rest.rs
@@ -34,13 +34,15 @@ use proxmox::tools::fs::CreateOptions;
 use pbs_tools::compression::{DeflateEncoder, Level};
 use pbs_tools::stream::AsyncReaderStream;
 use pbs_api_types::{Authid, Userid};
-use proxmox_rest_server::{ApiConfig, FileLogger, FileLogOptions, AuthError, RestEnvironment};
+use proxmox_rest_server::{
+    ApiConfig, FileLogger, FileLogOptions, AuthError, RestEnvironment, CompressionMethod,
+};
 use proxmox_rest_server::formatter::*;
 
-use crate::auth_helpers::*;
 use pbs_config::CachedUserInfo;
+
+use crate::auth_helpers::*;
 use crate::tools;
-use crate::tools::compression::CompressionMethod;
 
 extern "C" {
     fn tzset();
diff --git a/src/tools/mod.rs b/src/tools/mod.rs
index 8fd441b5..f2576b08 100644
--- a/src/tools/mod.rs
+++ b/src/tools/mod.rs
@@ -14,7 +14,6 @@ use proxmox_http::{
 
 pub mod apt;
 pub mod async_io;
-pub mod compression;
 pub mod config;
 pub mod disks;
 
-- 
2.30.2






More information about the pbs-devel mailing list