Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/commands/react_native/appcenter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
ext == OsStr::new("bundle");
then {
let url = format!("~/{filename}");
processor.add(&url, ReleaseFileSearch::collect_file(entry.path())?)?;
processor.add(&url, ReleaseFileSearch::collect_file(entry.path())?);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/commands/react_native/gradle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
processor.add(
&bundle_url,
ReleaseFileSearch::collect_file(bundle_path.clone())?,
)?;
);
processor.add(
&sourcemap_url,
ReleaseFileSearch::collect_file(sourcemap_path)?,
)?;
);

if let Ok(ram_bundle) = RamBundle::parse_unbundle_from_path(&bundle_path) {
debug!("File RAM bundle found, extracting its contents...");
Expand Down
4 changes: 2 additions & 2 deletions src/commands/react_native/xcode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,11 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
info!(" sourcemap path: {}", sourcemap_path.display());

let mut processor = SourceMapProcessor::new();
processor.add(&bundle_url, ReleaseFileSearch::collect_file(bundle_path)?)?;
processor.add(&bundle_url, ReleaseFileSearch::collect_file(bundle_path)?);
processor.add(
&sourcemap_url,
ReleaseFileSearch::collect_file(sourcemap_path)?,
)?;
);
processor.rewrite(&[base.parent().unwrap().to_str().unwrap()])?;
processor.add_sourcemap_references()?;
processor.add_debug_id_references()?;
Expand Down
2 changes: 1 addition & 1 deletion src/commands/sourcemaps/inject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
.collect_files()?;
for source in sources {
let url = path_as_url(&source.path);
processor.add(&url, source)?;
processor.add(&url, source);
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/commands/sourcemaps/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,11 @@ fn process_sources_from_bundle(
processor.add(
&bundle_url,
ReleaseFileSearch::collect_file(bundle_path.clone())?,
)?;
);
processor.add(
&sourcemap_url,
ReleaseFileSearch::collect_file(sourcemap_path)?,
)?;
);

if let Ok(ram_bundle) = sourcemap::ram_bundle::RamBundle::parse_unbundle_from_path(&bundle_path)
{
Expand Down Expand Up @@ -394,7 +394,7 @@ fn process_sources_from_paths(
for source in sources {
let local_path = source.path.strip_prefix(base_path).unwrap();
let url = format!("{}/{}{}", url_prefix, path_as_url(local_path), url_suffix);
processor.add(&url, source)?;
processor.add(&url, source);
}
}

Expand Down
4 changes: 1 addition & 3 deletions src/utils/sourcemaps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,8 @@ impl SourceMapProcessor {
}

/// Adds a new file for processing.
#[expect(clippy::unnecessary_wraps)]
pub fn add(&mut self, url: &str, file: ReleaseFileMatch) -> Result<()> {
pub fn add(&mut self, url: &str, file: ReleaseFileMatch) {
self.pending_sources.insert((url.to_string(), file));
Ok(())
}

fn flush_pending_sources(&mut self) {
Expand Down
Loading