diff options
author | 2022-04-08 16:55:58 -0700 | |
---|---|---|
committer | 2022-04-08 16:55:58 -0700 | |
commit | 1f68b8ada07bb05ecc96e5bfe7fb00345c9e55ad (patch) | |
tree | b339d18091cf742b6df9b60a6172fbf325b53b43 | |
parent | fdfbf1694077a555b332c054f0237fe2def94beb (diff) | |
download | bun-1f68b8ada07bb05ecc96e5bfe7fb00345c9e55ad.tar.gz bun-1f68b8ada07bb05ecc96e5bfe7fb00345c9e55ad.tar.zst bun-1f68b8ada07bb05ecc96e5bfe7fb00345c9e55ad.zip |
remove some code bloat
-rw-r--r-- | src/http.zig | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/src/http.zig b/src/http.zig index 430a72a6e..22c7da30f 100644 --- a/src/http.zig +++ b/src/http.zig @@ -3273,18 +3273,10 @@ pub const Server = struct { changed_files: []?[:0]u8, watchlist: watcher.Watchlist, ) void { - if (ctx.javascript_enabled) { - if (Output.isEmojiEnabled()) { - _onFileUpdate(ctx, events, changed_files, watchlist, true, true); - } else { - _onFileUpdate(ctx, events, changed_files, watchlist, true, false); - } + if (Output.isEmojiEnabled()) { + _onFileUpdate(ctx, events, changed_files, watchlist, true); } else { - if (Output.isEmojiEnabled()) { - _onFileUpdate(ctx, events, changed_files, watchlist, false, true); - } else { - _onFileUpdate(ctx, events, changed_files, watchlist, false, false); - } + _onFileUpdate(ctx, events, changed_files, watchlist, false); } } @@ -3294,7 +3286,6 @@ pub const Server = struct { events: []watcher.WatchEvent, changed_files: []?[:0]u8, watchlist: watcher.Watchlist, - comptime is_javascript_enabled: bool, comptime is_emoji_enabled: bool, ) void { var fbs = std.io.fixedBufferStream(&filechange_buf); @@ -3346,13 +3337,6 @@ pub const Server = struct { var content_fbs = std.io.fixedBufferStream(filechange_buf[header.len..]); var hinted_content_fbs = std.io.fixedBufferStream(filechange_buf_hinted[header.len..]); - defer { - if (comptime is_javascript_enabled) { - // TODO: does this need a lock? - // RequestContext.JavaScriptHandler.javascript_vm.incrementUpdateCounter(id, update_count); - } - } - if (comptime Environment.isDebug) { Output.prettyErrorln("[watcher] {s}: -- {}", .{ @tagName(kind), event.op }); } |