refactor: use *const Integrity for function parameters

Pass Integrity by pointer instead of by value to avoid unnecessary copies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude Bot
2025-12-01 04:35:43 +00:00
parent e2f58577bd
commit 4366e68caf
3 changed files with 4 additions and 4 deletions

View File

@@ -1003,7 +1003,7 @@ pub const PackageInstaller = struct {
alias.slice(this.lockfile.buffers.string_bytes.items),
resolution,
context,
this.lockfile.packages.items(.meta)[package_id].integrity,
&this.lockfile.packages.items(.meta)[package_id].integrity,
);
},
.remote_tarball => {

View File

@@ -129,7 +129,7 @@ pub fn enqueueTarballForReading(
alias: string,
resolution: *const Resolution,
task_context: TaskCallbackContext,
integrity: Integrity,
integrity: *const Integrity,
) void {
const path = this.lockfile.str(&resolution.value.local_tarball);
const task_id = Task.Id.forTarball(path);
@@ -152,7 +152,7 @@ pub fn enqueueTarballForReading(
alias,
path,
resolution.*,
integrity,
integrity.*,
)));
}

View File

@@ -1085,7 +1085,7 @@ pub fn installIsolatedPackages(
dep.name.slice(string_buf),
&pkg_res,
ctx,
lockfile.packages.items(.meta)[pkg_id].integrity,
&lockfile.packages.items(.meta)[pkg_id].integrity,
);
},
.remote_tarball => {