property_string: clippy: define bound once

Fixes the clippy lint:

warning: bound is defined in more than one place
   --> proxmox-schema/src/property_string.rs:352:14
    |
352 | pub fn parse<T: ApiType>(value: &str) -> Result<T, Error>
    |              ^
353 | where
354 |     T: for<'de> Deserialize<'de>,
    |     ^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#multiple_bound_locations
    = note: `#[warn(clippy::multiple_bound_locations)]` on by default

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Reviewed-by: Lukas Wagner <l.wagner@proxmox.com>
This commit is contained in:
Maximiliano Sandoval 2024-08-07 09:43:50 +02:00 committed by Thomas Lamprecht
parent 77fe0f6954
commit fe7f37e9b3

View File

@ -349,9 +349,9 @@ pub fn print<T: Serialize + ApiType>(value: &T) -> Result<String, Error> {
}
/// Deserialize a value from a property string.
pub fn parse<T: ApiType>(value: &str) -> Result<T, Error>
pub fn parse<T>(value: &str) -> Result<T, Error>
where
T: for<'de> Deserialize<'de>,
T: for<'de> Deserialize<'de> + ApiType,
{
parse_with_schema(value, &T::API_SCHEMA)
}