refactor(nix-compat/wire/bytes/reader): use fn for PhantomData

We don't actually hold a Tag, we just want to bind the type.

Change-Id: Ida67c026f852ed54c3f18df914cf5c31e6227fd5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11541
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
edef 2024-04-29 14:59:37 +00:00
parent 84b27760d0
commit 3548514d4a

View file

@ -58,7 +58,7 @@ pub(crate) struct ReadTrailer<R, T: Tag = Pad> {
data_len: u8,
filled: u8,
buf: T::Buf,
_phantom: PhantomData<*const T>,
_phantom: PhantomData<fn(T) -> T>,
}
/// read_trailer returns a [Future] that reads a trailer with a given [Tag] from `reader`