diff --git a/src/publication.rs b/src/publication.rs index 25f49fc..3e88ef4 100644 --- a/src/publication.rs +++ b/src/publication.rs @@ -44,17 +44,17 @@ impl ToPayload for &[u8; N] { /// # Note /// This is "deferred" because the closure will only be called once the publication is actually /// sent. -pub struct DeferredPublication Result> { +pub struct DeferredPublication { func: F, } -impl Result> DeferredPublication { +impl Result> DeferredPublication { pub fn new<'a>(func: F) -> Publication<'a, Self> { Publication::new(Self { func }) } } -impl Result> ToPayload for DeferredPublication { +impl Result> ToPayload for DeferredPublication { type Error = E; fn serialize(self, buffer: &mut [u8]) -> Result { (self.func)(buffer) diff --git a/src/varint.rs b/src/varint.rs index 6be3db6..5235937 100644 --- a/src/varint.rs +++ b/src/varint.rs @@ -38,7 +38,7 @@ impl VarintWriter for VarintBuffer { struct VarintVisitor; -struct VarintParser<'de, T: serde::de::SeqAccess<'de>> { +struct VarintParser<'de, T> { seq: T, _data: core::marker::PhantomData<&'de ()>, }