diff --git a/src/main.rs b/src/main.rs index c94a1de..3550699 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,10 +98,7 @@ impl file_rpc::Server for AhciState { } fn dup(&self, fd: u64) -> Result { - let mut files = self.files.write(); - let file = files[fd as usize]; - files.push(file); - Ok((files.len() - 1) as u64) + Ok(fd) } #[allow(clippy::significant_drop_tightening)]