From 86cfef51cf89d43bbeefa9a06ba1f80ef8e8ab15 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Thu, 30 Dec 2021 10:14:45 -0600 Subject: Fix use semantics of Incoming<'o, O>::owned() Lifetime requirements involving Done<'o> previously prevented any proper use of Owned. --- src/fuse/mod.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/fuse/mod.rs') diff --git a/src/fuse/mod.rs b/src/fuse/mod.rs index 5a4a7af..b4c31d0 100644 --- a/src/fuse/mod.rs +++ b/src/fuse/mod.rs @@ -38,10 +38,14 @@ pub struct Reply<'o, O: Operation<'o>> { #[must_use] #[doc(cfg(feature = "server"))] -pub struct Done<'o>(PhantomData<*mut &'o ()>); +pub struct Done<'o>(PhantomData<&'o mut &'o ()>); impl Done<'_> { fn done() -> Self { Done(PhantomData) } + + fn consume(self) { + drop(self); + } } -- cgit v1.2.3