mirror of
https://git.proxmox.com/git/proxmox
synced 2025-06-06 18:51:23 +00:00
[clippy] api-test: more int by value passing
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
dffed98348
commit
c6e022523b
@ -65,7 +65,7 @@ impl<'de, U: Unit> serde::de::Visitor<'de> for MemoryVisitor<U> {
|
|||||||
pub struct Parser<U: Unit>(PhantomData<U>);
|
pub struct Parser<U: Unit>(PhantomData<U>);
|
||||||
|
|
||||||
impl<U: Unit> Parser<U> {
|
impl<U: Unit> Parser<U> {
|
||||||
pub fn serialize<S>(value: &Memory, ser: S) -> Result<S::Ok, S::Error>
|
pub fn serialize<S>(value: Memory, ser: S) -> Result<S::Ok, S::Error>
|
||||||
where
|
where
|
||||||
S: serde::Serializer,
|
S: serde::Serializer,
|
||||||
{
|
{
|
||||||
@ -97,7 +97,7 @@ pub mod optional {
|
|||||||
where
|
where
|
||||||
S: serde::Serializer,
|
S: serde::Serializer,
|
||||||
{
|
{
|
||||||
super::Parser::<U>::serialize::<S>(&value.unwrap(), ser)
|
super::Parser::<U>::serialize::<S>(value.unwrap(), ser)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deserialize<'de, D>(de: D) -> Result<Option<Memory>, D::Error>
|
pub fn deserialize<'de, D>(de: D) -> Result<Option<Memory>, D::Error>
|
||||||
|
Loading…
Reference in New Issue
Block a user