From b1d7e92b669c6e072771daaa3943125ca8d986a5 Mon Sep 17 00:00:00 2001 From: 4lDO2 <4lDO2@protonmail.com> Date: Sun, 16 Jun 2024 13:07:08 +0200 Subject: [PATCH] Fix receiver type in Scheme{Sync,Async}::read --- src/scheme.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/scheme.rs b/src/scheme.rs index 24f5915..0315d03 100644 --- a/src/scheme.rs +++ b/src/scheme.rs @@ -239,7 +239,7 @@ pub trait SchemeAsync { Err(Error::new(EBADF)) } - async fn read(&self, id: usize, buf: &mut [u8], offset: u64, fcntl_flags: u32, ctx: &CallerCtx) -> Result<usize> { + async fn read(&mut self, id: usize, buf: &mut [u8], offset: u64, fcntl_flags: u32, ctx: &CallerCtx) -> Result<usize> { Err(Error::new(EBADF)) } @@ -326,12 +326,10 @@ pub trait SchemeSync { Err(Error::new(EBADF)) } - - fn read(&self, id: usize, buf: &mut [u8], offset: u64, fcntl_flags: u32, ctx: &CallerCtx) -> Result<usize> { + fn read(&mut self, id: usize, buf: &mut [u8], offset: u64, fcntl_flags: u32, ctx: &CallerCtx) -> Result<usize> { Err(Error::new(EBADF)) } - fn write(&mut self, id: usize, buf: &[u8], offset: u64, fcntl_flags: u32, ctx: &CallerCtx) -> Result<usize> { Err(Error::new(EBADF)) } -- GitLab