]> git.proxmox.com Git - proxmox.git/commitdiff
[clippy] api-test: more int by value passing
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 22 Aug 2019 07:07:07 +0000 (09:07 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 22 Aug 2019 07:07:07 +0000 (09:07 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
api-test/src/schema/memory.rs

index a214cb131a20fd2e65028f91fd5e9a29cda070ea..dccc3582690fbd469448cbdf986f2ef5b86e257c 100644 (file)
@@ -65,7 +65,7 @@ impl<'de, U: Unit> serde::de::Visitor<'de> for MemoryVisitor<U> {
 pub struct Parser<U: Unit>(PhantomData<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
         S: serde::Serializer,
     {
@@ -97,7 +97,7 @@ pub mod optional {
         where
             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>