]> git.proxmox.com Git - proxmox.git/commitdiff
api-macro: some more test code
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 28 Nov 2019 12:49:14 +0000 (13:49 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 28 Nov 2019 12:49:14 +0000 (13:49 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
proxmox-api-macro/tests/types.rs

index 82a4ca50400ef5b47fb3841abca7cfd31a0bf5f9..e6ceacf8b5724067d03d732f5075cbf6460046ca 100644 (file)
@@ -37,6 +37,7 @@ pub enum Selection {
     input: {
         properties: {
             arg: { type: OkString },
+            selection: { type: Selection },
         }
     },
     returns: { type: Boolean },
@@ -44,7 +45,8 @@ pub enum Selection {
 /// Check a string.
 ///
 /// Returns: Whether the string was "ok".
-pub fn string_check(arg: Value) -> Result<bool, Error> {
+pub fn string_check(arg: Value, selection: Selection) -> Result<bool, Error> {
     let _ = arg;
+    let _ = selection;
     panic!("body")
 }