From 311b2a40213aa48131a189f99dc4258d354c0c78 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Fri, 24 Dec 2021 04:58:51 -0600 Subject: Fix old warnings --- src/fuse/fs.rs | 55 +++---------------------------------------------------- 1 file changed, 3 insertions(+), 52 deletions(-) (limited to 'src/fuse/fs.rs') diff --git a/src/fuse/fs.rs b/src/fuse/fs.rs index 4cf3282..0c39ea7 100644 --- a/src/fuse/fs.rs +++ b/src/fuse/fs.rs @@ -1,13 +1,6 @@ -use async_trait::async_trait; -use nix::errno::Errno; - -use std::{ - num::NonZeroUsize, - ops::{Deref, DerefMut}, - sync::Arc, -}; - use crate::{Ino, TimeToLive}; +use async_trait::async_trait; +use std::{num::NonZeroUsize, ops::Deref, sync::Arc}; use super::{ io::{Attrs, EntryType}, @@ -43,7 +36,7 @@ pub trait Inode: Send + Sync { fn attrs(self: &FarcTo) -> (Attrs, TimeToLive); fn inode_type(self: &FarcTo) -> EntryType; - fn direct_io<'o>(self: &FarcTo) -> bool { + fn direct_io(self: &FarcTo) -> bool { false } @@ -82,46 +75,4 @@ pub trait Inode: Send + Sync { } } -#[async_trait] -pub trait Tape: Send + Sync { - type Fuse: Fuse; - - async fn seek(self: &mut Head, offset: u64) -> Result<(), Errno>; - - async fn rewind(self: &mut Head) -> Result<(), Errno> { - self.seek(0).await - } - - async fn read<'o>(self: &mut Head, (_, reply, _): Op<'o, Self::Fuse, Read>) -> Done<'o> { - reply.not_implemented() - } - - async fn write<'o>( - self: &mut Head, - (_, reply, _): Op<'o, Self::Fuse, Write>, - ) -> Done<'o> { - reply.not_implemented() - } -} - pub type FarcTo = <::Fuse as Fuse>::Farc; - -pub struct Head { - offset: u64, - inode: ::Farc, - tape: T, -} - -impl Deref for Head { - type Target = T; - - fn deref(&self) -> &Self::Target { - &self.tape - } -} - -impl DerefMut for Head { - fn deref_mut(&mut self) -> &mut Self::Target { - &mut self.tape - } -} -- cgit v1.2.3