diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-23 13:12:24 +0200 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-08-23 13:14:15 +0200 |
commit | 2e75681a0569b67c81efc051ea57f56f14c09543 (patch) | |
tree | ee8b8885a0cfe8500084507d5487545e6e4d2168 | |
parent | feat(treewide): Use a configuration file (diff) | |
download | yt-2e75681a0569b67c81efc051ea57f56f14c09543.tar.gz yt-2e75681a0569b67c81efc051ea57f56f14c09543.zip |
fix(storage/setters): Enforce status invariants
-rw-r--r-- | src/storage/video_database/setters.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |