Skip to content

Commit 519c227

Browse files
authored
Use short syntax for 'File.open' block
1 parent 6f46655 commit 519c227

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/invidious/helpers/static_file_handler.cr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,7 @@ module Kemal
175175

176176
if @cached_files.sum(&.[1][:data].bytesize) + (size = File.size(file_path)) < CACHE_LIMIT
177177
data = Bytes.new(size)
178-
179-
File.open(file_path) { |f| f.read(data) }
178+
File.open(file_path, &.read(data))
180179

181180
filestat = File.info(file_path)
182181

0 commit comments

Comments
 (0)