Skip to content

Commit

Permalink
🚚 Rename internal function
Browse files Browse the repository at this point in the history
  • Loading branch information
ChanTsune committed Oct 6, 2024
1 parent 4ec9095 commit 61a36da
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions cli/src/command/chmod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::{
cli::{PasswordArgs, SolidEntriesTransformStrategy, SolidEntriesTransformStrategyArgs},
command::{
ask_password,
commons::{run_manipulate_entry, TransformStrategyKeepSolid, TransformStrategyUnSolid},
commons::{run_transform_entry, TransformStrategyKeepSolid, TransformStrategyUnSolid},
Command,
},
utils::{GlobPatterns, PathPartExt},
Expand Down Expand Up @@ -43,7 +43,7 @@ fn archive_chmod(args: ChmodCommand) -> io::Result<()> {
let globs = GlobPatterns::new(args.files)
.map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))?;
match args.transform_strategy.strategy() {
SolidEntriesTransformStrategy::UnSolid => run_manipulate_entry(
SolidEntriesTransformStrategy::UnSolid => run_transform_entry(
args.archive.remove_part().unwrap(),
&args.archive,
|| password.as_deref(),
Expand All @@ -57,7 +57,7 @@ fn archive_chmod(args: ChmodCommand) -> io::Result<()> {
},
TransformStrategyUnSolid,
),
SolidEntriesTransformStrategy::KeepSolid => run_manipulate_entry(
SolidEntriesTransformStrategy::KeepSolid => run_transform_entry(
args.archive.remove_part().unwrap(),
&args.archive,
|| password.as_deref(),
Expand Down
6 changes: 3 additions & 3 deletions cli/src/command/chown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
cli::{PasswordArgs, SolidEntriesTransformStrategy, SolidEntriesTransformStrategyArgs},
command::{
ask_password,
commons::{run_manipulate_entry, TransformStrategyKeepSolid, TransformStrategyUnSolid},
commons::{run_transform_entry, TransformStrategyKeepSolid, TransformStrategyUnSolid},
Command,
},
utils::{GlobPatterns, PathPartExt},
Expand Down Expand Up @@ -42,7 +42,7 @@ fn archive_chown(args: ChownCommand) -> io::Result<()> {
let globs = GlobPatterns::new(args.files)
.map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))?;
match args.transform_strategy.strategy() {
SolidEntriesTransformStrategy::UnSolid => run_manipulate_entry(
SolidEntriesTransformStrategy::UnSolid => run_transform_entry(
args.archive.remove_part().unwrap(),
&args.archive,
|| password.as_deref(),
Expand All @@ -56,7 +56,7 @@ fn archive_chown(args: ChownCommand) -> io::Result<()> {
},
TransformStrategyUnSolid,
),
SolidEntriesTransformStrategy::KeepSolid => run_manipulate_entry(
SolidEntriesTransformStrategy::KeepSolid => run_transform_entry(
args.archive.remove_part().unwrap(),
&args.archive,
|| password.as_deref(),
Expand Down
4 changes: 2 additions & 2 deletions cli/src/command/commons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ where
}

#[cfg(feature = "memmap")]
pub(crate) fn run_manipulate_entry<'p, O, P, Provider, F, Transform>(
pub(crate) fn run_transform_entry<'p, O, P, Provider, F, Transform>(
output_path: O,
input_path: P,
mut password_provider: Provider,
Expand Down Expand Up @@ -622,7 +622,7 @@ where
}

#[cfg(not(feature = "memmap"))]
pub(crate) fn run_manipulate_entry<'p, O, P, Provider, F, Transform>(
pub(crate) fn run_transform_entry<'p, O, P, Provider, F, Transform>(
output_path: O,
input_path: P,
mut password_provider: Provider,
Expand Down
6 changes: 3 additions & 3 deletions cli/src/command/delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{
},
command::{
ask_password,
commons::{run_manipulate_entry, TransformStrategyKeepSolid, TransformStrategyUnSolid},
commons::{run_transform_entry, TransformStrategyKeepSolid, TransformStrategyUnSolid},
Command,
},
utils::{GlobPatterns, PathPartExt},
Expand Down Expand Up @@ -40,7 +40,7 @@ fn delete_file_from_archive(args: DeleteCommand) -> io::Result<()> {
let exclude_globs = GlobPatterns::try_from(args.exclude.unwrap_or_default())
.map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e))?;
match args.transform_strategy.strategy() {
SolidEntriesTransformStrategy::UnSolid => run_manipulate_entry(
SolidEntriesTransformStrategy::UnSolid => run_transform_entry(
args.output
.unwrap_or_else(|| args.file.archive.remove_part().unwrap()),
&args.file.archive,
Expand All @@ -55,7 +55,7 @@ fn delete_file_from_archive(args: DeleteCommand) -> io::Result<()> {
},
TransformStrategyUnSolid,
),
SolidEntriesTransformStrategy::KeepSolid => run_manipulate_entry(
SolidEntriesTransformStrategy::KeepSolid => run_transform_entry(
args.output
.unwrap_or_else(|| args.file.archive.remove_part().unwrap()),
&args.file.archive,
Expand Down
6 changes: 3 additions & 3 deletions cli/src/command/strip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::{
},
command::{
ask_password,
commons::{run_manipulate_entry, TransformStrategyKeepSolid, TransformStrategyUnSolid},
commons::{run_transform_entry, TransformStrategyKeepSolid, TransformStrategyUnSolid},
Command,
},
utils::PathPartExt,
Expand Down Expand Up @@ -51,15 +51,15 @@ impl Command for StripCommand {
fn strip_metadata(args: StripCommand) -> io::Result<()> {
let password = ask_password(args.password)?;
match args.transform_strategy.strategy() {
SolidEntriesTransformStrategy::UnSolid => run_manipulate_entry(
SolidEntriesTransformStrategy::UnSolid => run_transform_entry(
args.output
.unwrap_or_else(|| args.file.archive.remove_part().unwrap()),
&args.file.archive,
|| password.as_deref(),
|entry| Ok(Some(strip_entry_metadata(entry?, &args.strip_options))),
TransformStrategyUnSolid,
),
SolidEntriesTransformStrategy::KeepSolid => run_manipulate_entry(
SolidEntriesTransformStrategy::KeepSolid => run_transform_entry(
args.output
.unwrap_or_else(|| args.file.archive.remove_part().unwrap()),
&args.file.archive,
Expand Down
6 changes: 3 additions & 3 deletions cli/src/command/xattr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
command::{
ask_password,
commons::{
run_entries, run_manipulate_entry, TransformStrategyKeepSolid, TransformStrategyUnSolid,
run_entries, run_transform_entry, TransformStrategyKeepSolid, TransformStrategyUnSolid,
},
Command,
},
Expand Down Expand Up @@ -176,7 +176,7 @@ fn archive_set_xattr(args: SetXattrCommand) -> io::Result<()> {
.map_or_else(Default::default, |it| it.as_bytes());

match args.transform_strategy.strategy() {
SolidEntriesTransformStrategy::UnSolid => run_manipulate_entry(
SolidEntriesTransformStrategy::UnSolid => run_transform_entry(
args.archive.remove_part().unwrap(),
&args.archive,
|| password.as_deref(),
Expand All @@ -195,7 +195,7 @@ fn archive_set_xattr(args: SetXattrCommand) -> io::Result<()> {
},
TransformStrategyUnSolid,
),
SolidEntriesTransformStrategy::KeepSolid => run_manipulate_entry(
SolidEntriesTransformStrategy::KeepSolid => run_transform_entry(
args.archive.remove_part().unwrap(),
&args.archive,
|| password.as_deref(),
Expand Down

0 comments on commit 61a36da

Please sign in to comment.