forked from proxmox-mirrors/proxmox
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:
parent
77fe0f6954
commit
fe7f37e9b3
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user