summaryrefslogtreecommitdiffstats
path: root/db/db.go
diff options
context:
space:
mode:
Diffstat (limited to 'db/db.go')
-rw-r--r--db/db.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/db/db.go b/db/db.go
index c99bbea..4e17682 100644
--- a/db/db.go
+++ b/db/db.go
@@ -8,6 +8,7 @@ import (
"fmt"
"os"
"path"
+ "slices"
"sync"
"ricketyspace.net/fern/file"
@@ -87,12 +88,7 @@ func (fdb *FernDB) exists(feed, entry string) bool {
if _, ok := fdb.downloaded[feed]; !ok {
return false
}
- for _, e := range fdb.downloaded[feed] {
- if e == entry {
- return true
- }
- }
- return false
+ return slices.Contains(fdb.downloaded[feed], entry)
}
// Returns true if an `entry` for `feed` exists in the database; false