forked from Proxmox/proxmox
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 <w.bumiller@proxmox.com>
This commit is contained in:
parent
6221d86c64
commit
f04eb949d1
@ -17,7 +17,7 @@ where
|
||||
init: Option<Init>,
|
||||
closure: F,
|
||||
expecting: &'static str,
|
||||
_ty: PhantomData<T>,
|
||||
_ty: PhantomData<fn(T)>,
|
||||
}
|
||||
|
||||
impl<T, Out, F, Init> FoldSeqVisitor<T, Out, F, Init>
|
||||
|
Loading…
x
Reference in New Issue
Block a user