From 3190f78d0bdb67cedcd74d66ec594e17b979e074 Mon Sep 17 00:00:00 2001 From: pjht Date: Sun, 17 Nov 2024 21:51:46 -0600 Subject: [PATCH] Update to new struct version of FileWriteMode --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5478991..a91209e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -91,8 +91,7 @@ impl file_rpc::Server for Serv { } fn dup(&self, fd: u64) -> Result { - let file = self.open_files.get(fd as usize).ok_or(Errno::EBADF)?.clone(); - self.open_files.insert(file).map(|x| x as u64).ok_or(Errno::ENOMEM) + Ok(fd) } fn seek(&self, fd: u64, pos: file_rpc::SeekFrom) -> Result {