Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tui/src/ui/components/playlist/playlist_comp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,9 @@ impl Component for Playlist {
// Only try to adjust the cache capacity downwards if there is at least a MIN_DIFF_CACHE slot difference.
// Always grow the cache size if the area is bigger!
// Also never go below the MIN_CACHE_SIZE.
if area_as_usize.abs_diff(cache.capacity().get()) > MIN_DIFF_CACHE.get()
|| area_as_usize > cache.capacity().get()
&& area_as_usize > TrackCache::MIN_CACHE_SIZE.get()
if (area_as_usize.abs_diff(cache.capacity().get()) > MIN_DIFF_CACHE.get()
|| area_as_usize > cache.capacity().get())
&& area_as_usize > TrackCache::MIN_CACHE_SIZE.get()
{
// This should never panic as "TrackCache::MIN_CACHE_SIZE" is a NonZeroUsize itself, so this branch can never happen if 0
let new_cap = NonZeroUsize::new(area_as_usize).expect("Expected MIN Check to not fail");
Expand Down
Loading