From b3db8a5a710aa0890c80241ffb3fd9792bf1cbe7 Mon Sep 17 00:00:00 2001 From: Chuyan Zhang Date: Wed, 29 Nov 2023 13:29:03 -0800 Subject: Add rename --- src/memory/cached_inode.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/memory/cached_inode.rs') diff --git a/src/memory/cached_inode.rs b/src/memory/cached_inode.rs index 441d0fb..16c40c2 100644 --- a/src/memory/cached_inode.rs +++ b/src/memory/cached_inode.rs @@ -1,7 +1,3 @@ -use std::ffi::OsStr; -use std::os::unix::ffi::OsStrExt; -use std::path::Path; -use std::slice; use crate::disk::block::InodeBlock; use crate::disk::inode::{Inode, INODE_SIZE}; use crate::{utils, AyaFS}; @@ -9,6 +5,10 @@ use and_then_some::BoolExt; use fuser::FileType; use libc::{c_int, EIO, EISDIR, ENOENT, ENOTDIR, ENOTEMPTY}; use log::{debug, error}; +use std::ffi::OsStr; +use std::os::unix::ffi::OsStrExt; +use std::path::Path; +use std::slice; impl AyaFS { pub(crate) fn create_file( @@ -85,7 +85,7 @@ impl AyaFS { if inode.size >= 60 { self.deallocate_all_blocks_for(&inode).unwrap(); } - }, + } FileType::Directory => return Err(EISDIR), _ => return Err(EIO), } -- cgit v1.2.3-70-g09d2