diff --git a/rustcryptfs-fuse/src/encrypted_filesystem.rs b/rustcryptfs-fuse/src/encrypted_filesystem.rs index 7179368..c2de11d 100644 --- a/rustcryptfs-fuse/src/encrypted_filesystem.rs +++ b/rustcryptfs-fuse/src/encrypted_filesystem.rs @@ -22,6 +22,7 @@ trait OptionExt { } impl OptionExt for Option { + #[inline] fn enoent(self) -> IoResult { match self { Some(r) => Ok(r), @@ -82,6 +83,7 @@ impl EncryptedFs { } } + #[inline] fn get_path(&self, ino: u64) -> Option<&PathBuf> { self.inode_cache.get_path(ino) } @@ -119,6 +121,7 @@ impl EncryptedFs { }) } + #[inline] fn lookup_impl( &mut self, parent: u64, @@ -146,6 +149,7 @@ impl EncryptedFs { } } + #[inline] fn read_dir_impl( &mut self, ino: u64, @@ -213,6 +217,7 @@ impl EncryptedFs { Ok(()) } + #[inline] fn read_impl( &mut self, ino: u64, diff --git a/rustcryptfs-lib/src/content/mod.rs b/rustcryptfs-lib/src/content/mod.rs index 366b81b..e03c35f 100644 --- a/rustcryptfs-lib/src/content/mod.rs +++ b/rustcryptfs-lib/src/content/mod.rs @@ -68,6 +68,7 @@ impl ContentEnc { } /// Return the decrypted size of a file, based on the encrypted size. + #[inline] pub fn get_real_size(encrypted_size: u64) -> u64 { if encrypted_size == 0 { 0