From f04eb949d1fc21d26186386bb337e09c64630c75 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 22 Mar 2022 12:29:59 +0100 Subject: [PATCH] tfa: serde tools: improve variance and dropck `FoldSeqVisitor` doesn't actually own a `T` and therefore cannot drop a `T`, we only use it via the `Fn(&mut Out, T)`, so use `fn(T)` in the `PhantomData` to keep `T` contravariant. Signed-off-by: Wolfgang Bumiller --- proxmox-tfa/src/api/serde_tools.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxmox-tfa/src/api/serde_tools.rs b/proxmox-tfa/src/api/serde_tools.rs index 39f1f4ae..8fbe0fc2 100644 --- a/proxmox-tfa/src/api/serde_tools.rs +++ b/proxmox-tfa/src/api/serde_tools.rs @@ -17,7 +17,7 @@ where init: Option, closure: F, expecting: &'static str, - _ty: PhantomData, + _ty: PhantomData, } impl FoldSeqVisitor