From 2e75681a0569b67c81efc051ea57f56f14c09543 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 23 Aug 2024 13:12:24 +0200 Subject: fix(storage/setters): Enforce status invariants --- src/storage/video_database/setters.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/video_database/setters.rs b/src/storage/video_database/setters.rs index e2b38e6..76a36a7 100644 --- a/src/storage/video_database/setters.rs +++ b/src/storage/video_database/setters.rs @@ -131,7 +131,7 @@ pub async fn set_video_watched(app: &App, video: &Video) -> Result<()> { .await?; if old.status == new_status { - return Ok(()); + unreachable!("The video should not be marked as watched already.") } let now = Utc::now().timestamp(); -- cgit 1.4.1