Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit 39a331c

Browse files
committed
Avoid not_nil in date_added
1 parent df61870 commit 39a331c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/library/entry.cr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ abstract class Entry
226226
end
227227

228228
def date_added : Time
229-
date_added = nil
229+
date_added = Time::UNIX_EPOCH
230230
TitleInfo.new @book.dir do |info|
231231
info_da = info.date_added[@title]?
232232
if info_da.nil?
@@ -236,7 +236,7 @@ abstract class Entry
236236
date_added = info_da
237237
end
238238
end
239-
date_added.not_nil! # is it ok to set not_nil! here?
239+
date_added
240240
end
241241

242242
# Hack to have abstract class methods

0 commit comments

Comments
 (0)