Remove unnecessary dup implementations

This commit is contained in:
Jeremy Soller
2018-10-20 08:08:31 -06:00
parent 9570de21d1
commit 15313f98af
8 changed files with 1 additions and 178 deletions
-16
View File
@@ -59,22 +59,6 @@ impl Scheme for DebugScheme {
Ok(id)
}
fn dup(&self, id: usize, buf: &[u8]) -> Result<usize> {
if ! buf.is_empty() {
return Err(Error::new(EINVAL));
}
let flags = {
let handles = handles();
*handles.get(&id).ok_or(Error::new(EBADF))?
};
let new_id = NEXT_ID.fetch_add(1, Ordering::SeqCst);
handles_mut().insert(new_id, flags);
Ok(new_id)
}
/// Read the file `number` into the `buffer`
///
/// Returns the number of bytes read