From 2d9fbc02abb5379242d9f665936e2b5296cd8896 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Fri, 17 Dec 2021 08:07:02 +0100 Subject: [PATCH] schema: fix deprecation warnings in tests Signed-off-by: Wolfgang Bumiller --- proxmox-schema/tests/schema.rs | 2 +- proxmox-schema/tests/schema_verification.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox-schema/tests/schema.rs b/proxmox-schema/tests/schema.rs index 4b4a8371..e65b8fb2 100644 --- a/proxmox-schema/tests/schema.rs +++ b/proxmox-schema/tests/schema.rs @@ -13,7 +13,7 @@ fn parse_query_string>( .into_owned() .collect(); - parse_parameter_strings(¶m_list, schema.into(), test_required) + schema.into().parse_parameter_strings(¶m_list, test_required) } #[test] diff --git a/proxmox-schema/tests/schema_verification.rs b/proxmox-schema/tests/schema_verification.rs index a1b10083..09d7d87a 100644 --- a/proxmox-schema/tests/schema_verification.rs +++ b/proxmox-schema/tests/schema_verification.rs @@ -88,7 +88,7 @@ fn test_verify( data: &Value, expected_errors: &[(&str, &str)], ) -> Result<(), Error> { - match verify_json(data, schema) { + match schema.verify_json(data) { Ok(_) => bail!("expected errors, but got Ok()"), Err(err) => compare_error(expected_errors, err)?, }