remove extra filter as already filtered by self::files

This commit is contained in:
yggverse 2025-08-11 14:25:39 +03:00
parent d5821c3ba6
commit a5133b006b

View file

@ -70,16 +70,7 @@ impl Public {
let t = f.len();
let l = limit.unwrap_or(t);
let mut b = Vec::with_capacity(l);
for file in f
.into_iter()
.skip(start.unwrap_or_default())
.take(l)
.filter(|f| {
f.path()
.extension()
.is_some_and(|e| !e.is_empty() && e.to_string_lossy() == EXTENSION)
})
{
for file in f.into_iter().skip(start.unwrap_or_default()).take(l) {
b.push(Torrent {
bytes: fs::read(file.path())?,
time: file.metadata()?.modified()?.into(),