From 297aca53f7be20ddef6c44b8c7d3a862a5504f84 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 21 Nov 2019 11:02:48 +0100 Subject: [PATCH] proxmox: add sortable-macro feature Use: # Cargo.toml: [dependencies] proxmox = { version = "0.1", features = [ "sortable-macro" ] } # file.rs use proxmox::{sortable, identity}; #[sortable] const DATA: &[u8; 4] = sorted!([3, 4, 1, 2]); Signed-off-by: Wolfgang Bumiller --- proxmox/Cargo.toml | 2 ++ proxmox/src/lib.rs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/proxmox/Cargo.toml b/proxmox/Cargo.toml index d3c2c8cc..a295a408 100644 --- a/proxmox/Cargo.toml +++ b/proxmox/Cargo.toml @@ -12,8 +12,10 @@ proxmox-api = { path = "../proxmox-api" } proxmox-api-macro = { path = "../proxmox-api-macro", optional = true } proxmox-sys = { path = "../proxmox-sys" } proxmox-tools = { path = "../proxmox-tools" } +sorted-data = { path = "../sorted-data", optional = true } [features] default = [] valgrind = ["proxmox-tools/valgrind"] api-macro = ["proxmox-api-macro"] +sortable-macro = ["sorted-data"] diff --git a/proxmox/src/lib.rs b/proxmox/src/lib.rs index 91d55321..0f7a8e3d 100644 --- a/proxmox/src/lib.rs +++ b/proxmox/src/lib.rs @@ -8,3 +8,8 @@ pub mod api { #[cfg(feature = "api-macro")] pub use proxmox_api_macro::{api, router}; } + +#[cfg(feature = "sortable-macro")] +pub use proxmox_tools::identity; +#[cfg(feature = "sortable-macro")] +pub use sorted_data::{self, sortable};