From 66fa418e39c20695e3a1a9e08dcde898fcd3af7d Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 31 Mar 2023 22:14:34 +0000 Subject: fix(cargo): response-macros feature flag --- Cargo.toml | 1 + README.md | 3 +++ src/response.rs | 1 + 3 files changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 95b8dbb..1d32896 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ categories = ["web-programming"] [features] logger = ["pretty_env_logger"] auto-deduce-mime = ["tree_magic"] +response-macros = [] [dependencies] # SSL diff --git a/README.md b/README.md index cfa5808..24c2a45 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,9 @@ tokio = { version = "0.2.4", features = ["full"] } # If you would like to use the built-in MIME dedection when `Success`-ing a file # (recommended) # windmark = { version = "0.2.4", features = ["auto-deduce-mime"] } + +# If you would like to use macro-based responses (as seen below) +# windmark = { version = "0.2.4", features = ["response-macros"] } ``` ### Implement a Windmark server diff --git a/src/response.rs b/src/response.rs index 455bf42..9c1629a 100644 --- a/src/response.rs +++ b/src/response.rs @@ -18,6 +18,7 @@ //! Content and response handlers +#[cfg(feature = "response-macros")] mod macros; macro_rules! response { -- cgit v1.2.3