aboutsummaryrefslogtreecommitdiff
path: root/src/open.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/open.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/open.zig')
-rw-r--r--src/open.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/open.zig b/src/open.zig
index 3224207c9..a496e9138 100644
--- a/src/open.zig
+++ b/src/open.zig
@@ -96,7 +96,7 @@ pub const Editor = enum(u8) {
inline for (default_preference_list) |editor| {
if (bin_name.get(editor)) |path| {
if (which(buf, PATH, cwd, path)) |bin| {
- out.* = std.mem.span(bin);
+ out.* = bun.asByteSlice(bin);
return editor;
}
}
@@ -111,7 +111,7 @@ pub const Editor = enum(u8) {
if (bin_name.get(editor)) |path| {
if (path.len > 0) {
if (which(buf, PATH, cwd, path)) |bin| {
- out.* = std.mem.span(bin);
+ out.* = bun.asByteSlice(bin);
return true;
}
}
@@ -126,7 +126,7 @@ pub const Editor = enum(u8) {
if (std.os.open(path, 0, 0)) |opened| {
std.os.close(opened);
if (out != null) {
- out.?.* = std.mem.span(path);
+ out.?.* = bun.asByteSlice(path);
}
return true;
} else |_| {}