aboutsummaryrefslogtreecommitdiff
path: root/src/install/dependency.zig
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-02-23 23:57:19 -0800
committerGravatar GitHub <noreply@github.com> 2023-02-23 23:57:19 -0800
commit3f04f8d0a653cf5decef2225c2044742b382718a (patch)
tree91eb6500834e3157ecb9ab208101aa368a1191c8 /src/install/dependency.zig
parentb5bdde28ed34070cbb1d34d13f414f4c513ee40d (diff)
downloadbun-3f04f8d0a653cf5decef2225c2044742b382718a.tar.gz
bun-3f04f8d0a653cf5decef2225c2044742b382718a.tar.zst
bun-3f04f8d0a653cf5decef2225c2044742b382718a.zip
Upgrade Zig (#2151)
* fixup * Upgrade Zig * Remove bad assertion * strings * bump * mode -> optimize * optimize * Linux build * Update bindgen.zig
Diffstat (limited to 'src/install/dependency.zig')
-rw-r--r--src/install/dependency.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/install/dependency.zig b/src/install/dependency.zig
index 902195170..d93629a82 100644
--- a/src/install/dependency.zig
+++ b/src/install/dependency.zig
@@ -165,7 +165,7 @@ pub inline fn isSCPLikePath(dependency: string) bool {
var at_index: ?usize = null;
- for (dependency) |c, i| {
+ for (dependency, 0..) |c, i| {
switch (c) {
'@' => {
if (at_index == null) at_index = i;
@@ -189,7 +189,7 @@ pub inline fn isGitHubRepoPath(dependency: string) bool {
var hash_index: usize = 0;
var slash_index: usize = 0;
- for (dependency) |c, i| {
+ for (dependency, 0..) |c, i| {
switch (c) {
'/' => {
if (i == 0) return false;
@@ -492,7 +492,7 @@ pub const Version = struct {
'n' => {
if (strings.hasPrefixComptime(dependency, "npm:") and dependency.len > "npm:".len) {
const remain = dependency["npm:".len + @boolToInt(dependency["npm:".len] == '@') ..];
- for (remain) |c, i| {
+ for (remain, 0..) |c, i| {
if (c == '@') {
return infer(remain[i + 1 ..]);
}
@@ -772,7 +772,7 @@ pub fn parseWithTag(
var hash_index: usize = 0;
var slash_index: usize = 0;
- for (input) |c, i| {
+ for (input, 0..) |c, i| {
switch (c) {
'/' => {
slash_index = i;