This function has 8 arguments. This can be reduced to 4 or 5 arguments if identical set of arguments are contained within a structure.
Filepath: /workspaces/rencfs/src/encryptedfs.rs
/// Helpful when we want to copy just some portions of the file.
pub async fn copy_file_range(
&self,
src_ino: u64,
src_offset: u64,
dest_ino: u64,
dest_offset: u64,
size: usize,
src_fh: u64,
dest_fh: u64,
) -> FsResult<usize>
Based on above optimisation, same function will have reduced set of arguments yet achieves the same functionality
/// Helpful when we want to copy just some portions of the file.
pub async fn copy_file_range(
&self,
ino: InodeMetaData,
size: usize,
fh: FileHandle,
) -> FsResult<usize>
This function has 8 arguments. This can be reduced to 4 or 5 arguments if identical set of arguments are contained within a structure. Filepath: /workspaces/rencfs/src/encryptedfs.rs
Based on above optimisation, same function will have reduced set of arguments yet achieves the same functionality
https://crates.io/crates/bon