From 75cced9d4c101ec2f9f04ed95621ff3a3f750eae Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Wed, 5 Jan 2022 02:52:04 -0600 Subject: Refactor impls of Reply as individual traits --- examples/passthrough.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/passthrough.rs') diff --git a/examples/passthrough.rs b/examples/passthrough.rs index 5ecb2e8..1607f10 100644 --- a/examples/passthrough.rs +++ b/examples/passthrough.rs @@ -102,7 +102,7 @@ impl Passthrough { let path = parent.path.join(request.name()); let (reply, metadata) = reply.and_then(fs::symlink_metadata(&path).await)?; - reply.found(New(&mut self.known, Inode::new(path, metadata)), Ttl::MAX) + reply.known(New(&mut self.known, Inode::new(path, metadata)), Ttl::MAX) } fn forget<'o>(&mut self, (request, reply): Op<'o, ops::Forget>) -> Done<'o> { @@ -124,14 +124,14 @@ impl Passthrough { fn getattr<'o>(&mut self, (request, reply): Op<'o, ops::Getattr>) -> Done<'o> { let (reply, inode) = reply.and_then(self.known(request.ino()))?; - reply.known(inode) + reply.stat(inode) } async fn readlink<'o>(&mut self, (request, reply): Op<'o, ops::Readlink>) -> Done<'o> { let (reply, inode) = reply.and_then(self.known(request.ino()))?; let (reply, target) = reply.and_then(fs::read_link(&inode.path).await)?; - reply.target(&target) + reply.blob(&target) } async fn open<'o>(&mut self, (request, reply): Op<'o, ops::Open>) -> Done<'o> { -- cgit v1.2.3