Remove warnings
This commit is contained in:
parent
78432b3875
commit
b756dd59eb
6 changed files with 8 additions and 10 deletions
|
@ -5,7 +5,7 @@ use super::Scheme;
|
|||
pub struct DebugScheme;
|
||||
|
||||
impl Scheme for DebugScheme {
|
||||
fn open(&mut self, path: &[u8], flags: usize) -> Result<usize> {
|
||||
fn open(&mut self, path: &[u8], _flags: usize) -> Result<usize> {
|
||||
println!("DebugScheme::open: {}", unsafe { str::from_utf8_unchecked(path) });
|
||||
Ok(0)
|
||||
}
|
||||
|
@ -13,21 +13,21 @@ impl Scheme for DebugScheme {
|
|||
/// Read the file `number` into the `buffer`
|
||||
///
|
||||
/// Returns the number of bytes read
|
||||
fn read(&mut self, file: usize, buffer: &mut [u8]) -> Result<usize> {
|
||||
fn read(&mut self, _file: usize, _buffer: &mut [u8]) -> Result<usize> {
|
||||
Ok(0)
|
||||
}
|
||||
|
||||
/// Write the `buffer` to the `file`
|
||||
///
|
||||
/// Returns the number of bytes written
|
||||
fn write(&mut self, file: usize, buffer: &[u8]) -> Result<usize> {
|
||||
fn write(&mut self, _file: usize, buffer: &[u8]) -> Result<usize> {
|
||||
//TODO: Write bytes, do not convert to str
|
||||
print!("{}", unsafe { str::from_utf8_unchecked(buffer) });
|
||||
Ok(buffer.len())
|
||||
}
|
||||
|
||||
/// Close the file `number`
|
||||
fn close(&mut self, file: usize) -> Result<()> {
|
||||
fn close(&mut self, _file: usize) -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue