diff --git a/src/fs.rs b/src/fs.rs index c4bd554..17138a1 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -220,7 +220,7 @@ impl> Debug for Ext2 { } } -pub struct Inodes<'vol, S: 'vol + SectorSize, V: 'vol + Volume> { +pub struct Inodes<'vol, S: SectorSize, V: 'vol + Volume> { fs: &'vol Ext2, block_groups: &'vol [BlockGroupDescriptor], log_block_size: u32, @@ -260,12 +260,12 @@ impl<'vol, S: SectorSize, V: 'vol + Volume> Iterator } #[derive(Debug, Clone)] -pub struct Inode<'vol, S: 'vol + SectorSize, V: 'vol + Volume> { +pub struct Inode<'vol, S: SectorSize, V: 'vol + Volume> { fs: &'vol Ext2, inner: RawInode, } -impl<'vol, S: 'vol + SectorSize, V: 'vol + Volume> Inode<'vol, S, V> { +impl<'vol, S: SectorSize, V: 'vol + Volume> Inode<'vol, S, V> { pub fn new(fs: &'vol Ext2, inner: RawInode) -> Inode<'vol, S, V> { Inode { fs, inner } } @@ -442,7 +442,7 @@ impl<'vol, S: 'vol + SectorSize, V: 'vol + Volume> Inode<'vol, S, V> { pub struct InodeBlocks< 'vol: 'inode, 'inode, - S: 'vol + SectorSize, + S: SectorSize, V: 'vol + Volume, > { inode: &'inode Inode<'vol, S, V>, @@ -482,7 +482,7 @@ impl<'vol, 'inode, S: SectorSize, V: 'vol + Volume> Iterator pub struct Directory< 'vol: 'inode, 'inode, - S: 'vol + SectorSize, + S: SectorSize, V: 'vol + Volume, > { blocks: InodeBlocks<'vol, 'inode, S, V>, diff --git a/src/sector.rs b/src/sector.rs index 911f93a..ee59227 100644 --- a/src/sector.rs +++ b/src/sector.rs @@ -4,7 +4,7 @@ use core::ops::{Add, Sub}; use core::fmt::{self, Debug, Display, LowerHex}; use core::iter::Step; -pub trait SectorSize: Clone + Copy + PartialEq + PartialOrd { +pub trait SectorSize: Clone + Copy + PartialEq + PartialOrd + 'static { // log_sector_size = log_2(sector_size) const LOG_SIZE: u32; const SIZE: usize = 1 << Self::LOG_SIZE;