From d841e6d89fd97152fe9afcbfe2869d68a15e90d4 Mon Sep 17 00:00:00 2001 From: Marlon Baeten Date: Fri, 27 Oct 2023 11:47:39 +0200 Subject: [PATCH] Fix formatting --- memory-serve-macros/Cargo.toml | 2 +- memory-serve-macros/src/utils.rs | 10 +++++++--- memory-serve/src/lib.rs | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/memory-serve-macros/Cargo.toml b/memory-serve-macros/Cargo.toml index abb3715..26d9e32 100644 --- a/memory-serve-macros/Cargo.toml +++ b/memory-serve-macros/Cargo.toml @@ -15,7 +15,7 @@ brotli = "3.4" mime_guess = "2.0" proc-macro2 = "1.0" sha256 = "1.4" -walkdir = "2.4" +walkdir = "2" tracing = "0.1" quote = { version = "1.0", default-features = false } syn = { version = "2.0", default-features = false } diff --git a/memory-serve-macros/src/utils.rs b/memory-serve-macros/src/utils.rs index cd1a73c..12a51a7 100644 --- a/memory-serve-macros/src/utils.rs +++ b/memory-serve-macros/src/utils.rs @@ -113,10 +113,14 @@ pub(crate) fn list_assets>(path: P) -> Vec { let route = path_to_route(entry.path()); if brotli_bytes.is_empty() { - info!("including {:?} {} bytes", entry.path(), bytes.len()); + info!("including {:?} {} bytes", route, bytes.len()); } else { - info!("including {:?} {} -> {} bytes (compressed)", entry.path(), bytes.len(), brotli_bytes.len()); - + info!( + "including {:?} {} -> {} bytes (compressed)", + route, + bytes.len(), + brotli_bytes.len() + ); }; Some(Asset { diff --git a/memory-serve/src/lib.rs b/memory-serve/src/lib.rs index 2633a6f..9379be5 100644 --- a/memory-serve/src/lib.rs +++ b/memory-serve/src/lib.rs @@ -45,7 +45,7 @@ //! //! #[tokio::main] //! async fn main() { -//! let memory_router = MemoryServe::new(load_assets!("../static")) +//! let memory_router = MemoryServe::new(load_assets!("static")) //! .index_file(Some("/index.html")) //! .into_router(); //!