mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-24 11:58:50 +00:00
Fix Ameba Lint/UselessAssign
This commit is contained in:
committed by
Émilien (perso)
parent
7749ea1956
commit
89a0761a19
@@ -106,8 +106,7 @@ Spectator.describe StaticAssetsHandler do
|
||||
file_link = "/#{File.basename(temporary_file.path)}"
|
||||
|
||||
# Make request
|
||||
headers = HTTP::Headers{"Range" => "bytes=0-2"}
|
||||
response = handle HTTP::Request.new("GET", file_link, headers)
|
||||
handle HTTP::Request.new("GET", file_link, HTTP::Headers{"Range" => "bytes=0-2"})
|
||||
|
||||
# Mutate file on disk
|
||||
temporary_file << "Something else"
|
||||
|
||||
@@ -71,7 +71,7 @@ module Invidious::HttpServer
|
||||
|
||||
# Writes file data to the cache
|
||||
private def flush_io_to_cache(io, file_path, file_info)
|
||||
if @@cached_files.sum(&.[1].size) + (size = file_info.size) < CACHE_LIMIT
|
||||
if @@cached_files.sum(&.[1].size) + file_info.size < CACHE_LIMIT
|
||||
data_slice = io.to_slice
|
||||
@@cached_files[file_path] = CachedFile.new(data_slice, file_info.size, file_info.modification_time)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user