refactor: make video view count non-optional
This commit is contained in:
parent
6ee24081da
commit
1f6a9a5aaa
18 changed files with 312 additions and 311 deletions
|
|
@ -209,7 +209,8 @@ fn map_search_items(
|
|||
publish_date_txt: video.published_time_text,
|
||||
view_count: video
|
||||
.view_count_text
|
||||
.map(|txt| util::parse_numeric(&txt).unwrap_or_default()),
|
||||
.and_then(|txt| util::parse_numeric(&txt).ok())
|
||||
.unwrap_or_default(),
|
||||
is_live: video.thumbnail_overlays.is_live(),
|
||||
is_short: video.thumbnail_overlays.is_short(),
|
||||
short_description: video
|
||||
|
|
|
|||
Reference in a new issue