From 928578a8408315b570787044077c3cd43a4293c9 Mon Sep 17 00:00:00 2001 From: gengteng Date: Sun, 8 Oct 2023 20:22:31 +0800 Subject: [PATCH] refactor features --- Cargo.toml | 8 ++++++-- tarpaulin.toml | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 64f1168..adff9c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -64,7 +64,10 @@ once_cell = "1.18.0" rmp-serde = "1.1.2" [features] -default = ["json", "form", "query"] +default = ["basic", "validator"] +basic = ["json", "form", "query"] +garde = ["dep:garde"] +validator = ["dep:validator"] json = ["axum/json"] form = ["axum/form"] query = ["axum/query"] @@ -81,4 +84,5 @@ extra_form = ["axum-extra/form"] extra_protobuf = ["axum-extra/protobuf"] all_extra_types = ["extra", "extra_typed_path", "extra_query", "extra_form", "extra_protobuf"] all_types = ["json", "form", "query", "typed_header", "typed_multipart", "msgpack", "yaml", "all_extra_types"] -full = ["all_types", "422", "into_json"] +full = ["validator", "all_types", "422", "into_json"] +full_garde = ["garde", "all_types", "422", "into_json"] diff --git a/tarpaulin.toml b/tarpaulin.toml index cac6490..b7fd571 100644 --- a/tarpaulin.toml +++ b/tarpaulin.toml @@ -1,10 +1,10 @@ [feature_default] [feature_all_types_into_json] -features = "all_types into_json" +features = "validator garde all_types into_json" [feature_all_types_422] -features = "all_types 422" +features = "validator garde all_types 422" [feature_all_types_422_into_json] -features = "all_types 422 into_json" \ No newline at end of file +features = "validator garde all_types 422 into_json" \ No newline at end of file