diff options
| author | Alejandro Soto <alejandro@34project.org> | 2022-01-05 02:52:04 -0600 |
|---|---|---|
| committer | Alejandro Soto <alejandro@34project.org> | 2022-01-05 02:52:04 -0600 |
| commit | 75cced9d4c101ec2f9f04ed95621ff3a3f750eae (patch) | |
| tree | a8ff3fa46a75b18ee3c1133aa6fc0857132d6115 /examples/passthrough.rs | |
| parent | ff17b04143dde5157808be5bcf1cbf8a942db4c4 (diff) | |
Refactor impls of Reply as individual traits
Diffstat (limited to '')
| -rw-r--r-- | examples/passthrough.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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> { |
