diff --git a/scheme/debug.rs b/scheme/debug.rs index 0dc67267ac9a17831497c37e8b40085b914440b1..c3b77d8868fd630b184f703752021e81e11c8c49 100644 --- a/scheme/debug.rs +++ b/scheme/debug.rs @@ -62,7 +62,7 @@ impl Scheme for DebugScheme { Ok(buffer.len()) } - fn fsync(&mut self, file: usize) -> Result<()> { + fn fsync(&mut self, _file: usize) -> Result<()> { Ok(()) } diff --git a/scheme/env.rs b/scheme/env.rs index a04142f11e4ba4cff89fd675a0808560c98d11be..6e577833042ac623a72549a3a551e7c2325cba16 100644 --- a/scheme/env.rs +++ b/scheme/env.rs @@ -78,7 +78,7 @@ impl Scheme for EnvScheme { Err(Error::NotPermitted) } - fn fsync(&mut self, file: usize) -> Result<()> { + fn fsync(&mut self, _file: usize) -> Result<()> { Ok(()) } diff --git a/scheme/initfs.rs b/scheme/initfs.rs index 0a33ce781708718990b558da8a749e7014f0dfd8..96d7d35dd95c049120fad0f4decb5b6a9b0df2e4 100644 --- a/scheme/initfs.rs +++ b/scheme/initfs.rs @@ -79,7 +79,7 @@ impl Scheme for InitFsScheme { Err(Error::NotPermitted) } - fn fsync(&mut self, file: usize) -> Result<()> { + fn fsync(&mut self, _file: usize) -> Result<()> { Ok(()) } diff --git a/scheme/irq.rs b/scheme/irq.rs index 1720d9360e6d77294bcfa81fe9cd58427629bbfc..2e762d445701eed138862d58c0bd5d67165e1f6b 100644 --- a/scheme/irq.rs +++ b/scheme/irq.rs @@ -20,7 +20,7 @@ impl Scheme for IrqScheme { } fn dup(&mut self, file: usize) -> Result<usize> { - Err(Error::NotPermitted) + Ok(file) } fn read(&mut self, file: usize, buffer: &mut [u8]) -> Result<usize> { @@ -32,9 +32,9 @@ impl Scheme for IrqScheme { // Safe if the length of the buffer is larger than the size of a usize assert!(buffer.len() >= mem::size_of::<usize>()); unsafe { *(buffer.as_mut_ptr() as *mut usize) = current; } - return Ok(mem::size_of::<usize>()); + Ok(mem::size_of::<usize>()) } else { - return Ok(0); + Ok(0) } } else { Err(Error::InvalidValue) @@ -49,9 +49,9 @@ impl Scheme for IrqScheme { if ack == current { ACKS.lock()[file] = ack; unsafe { acknowledge(file); } - return Ok(mem::size_of::<usize>()); + Ok(mem::size_of::<usize>()) } else { - return Ok(0); + Ok(0) } } else { Err(Error::InvalidValue) @@ -62,7 +62,7 @@ impl Scheme for IrqScheme { Ok(()) } - fn close(&mut self, file: usize) -> Result<()> { + fn close(&mut self, _file: usize) -> Result<()> { Ok(()) } }