summaryrefslogtreecommitdiff
path: root/examples/ext2.rs
diff options
context:
space:
mode:
authorAlejandro Soto <alejandro@34project.org>2022-01-05 02:52:04 -0600
committerAlejandro Soto <alejandro@34project.org>2022-01-05 02:52:04 -0600
commit75cced9d4c101ec2f9f04ed95621ff3a3f750eae (patch)
treea8ff3fa46a75b18ee3c1133aa6fc0857132d6115 /examples/ext2.rs
parentff17b04143dde5157808be5bcf1cbf8a942db4c4 (diff)
Refactor impls of Reply as individual traits
Diffstat (limited to '')
-rw-r--r--examples/ext2.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/ext2.rs b/examples/ext2.rs
index 0a1722e..dd55867 100644
--- a/examples/ext2.rs
+++ b/examples/ext2.rs
@@ -347,7 +347,7 @@ impl Ext2 {
let ino = request.ino();
let (reply, inode) = reply.and_then(self.inode(ino))?;
- reply.known(&Resolved { ino, inode })
+ reply.stat(&Resolved { ino, inode })
}
async fn lookup<'o>(&self, (request, reply): Op<'o, ops::Lookup>) -> Done<'o> {
@@ -370,9 +370,9 @@ impl Ext2 {
};
if let Some(inode) = inode {
- reply.found(inode, Ttl::MAX)
+ reply.known(inode, Ttl::MAX)
} else {
- reply.not_found(Ttl::MAX)
+ reply.not_found_for(Ttl::MAX)
}
}
@@ -387,7 +387,7 @@ impl Ext2 {
let size = inode.i_size as usize;
if size < size_of::<[u32; 15]>() {
- return reply.target(OsStr::from_bytes(&cast_slice(&inode.i_block)[..size]));
+ return reply.slice(&cast_slice(&inode.i_block)[..size]);
}
/* This is unlikely to ever spill, and is guaranteed not to
@@ -407,7 +407,7 @@ impl Ext2 {
offset += segment.len() as u64;
}
- reply.gather_target(&segments)
+ reply.gather(&segments)
}
async fn readdir<'o>(&self, (request, reply): Op<'o, ops::Readdir>) -> Done<'o> {