mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
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:
@@ -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 => {
|
||||
|
||||
@@ -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.*,
|
||||
)));
|
||||
}
|
||||
|
||||
|
||||
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user