Skip to content

Commit 9daae6d

Browse files
Update src/utils/mobile_app/ipa.rs
Co-authored-by: Daniel Szoke <7881302+szokeasaurusrex@users.noreply.github.com>
1 parent b2cef47 commit 9daae6d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/utils/mobile_app/ipa.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,13 @@ pub fn ipa_to_xcarchive(ipa_path: &Path, ipa_bytes: &[u8], temp_dir: &TempDir) -
112112
Ok(xcarchive_dir)
113113
}
114114

115-
fn extract_app_name_from_ipa(archive: &ZipArchive<Cursor<&[u8]>>) -> Result<String> {
115+
fn extract_app_name_from_ipa<'a>(archive: &'a ZipArchive<Cursor<&[u8]>>) -> Result<&'a str> {
116116
archive
117117
.file_names()
118118
.filter(|name| name.starts_with("Payload/") && name.ends_with(".app/Info.plist"))
119119
.min_by_key(|name| name.len())
120120
.and_then(|name| name.strip_prefix("Payload/"))
121121
.and_then(|name| name.split('/').next())
122122
.and_then(|name| name.strip_suffix(".app"))
123-
.map(|name| name.to_owned())
124123
.ok_or_else(|| anyhow!("No .app found in IPA"))
125124
}

0 commit comments

Comments
 (0)