diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-11-07 15:18:42 +0100 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-11-07 15:19:22 +0100 |
| commit | 2e7333c5c5c89232171fe79b9e40b1d7de539672 (patch) | |
| tree | 4b9fafb2d68f50307a58c0e69c0e663fce7372a5 | |
| parent | chore(yt/{cmd,app}): Use the new config macro and adapt to cli changes (diff) | |
| download | yt-2e7333c5c5c89232171fe79b9e40b1d7de539672.zip | |
fix(yt/storage/db/insert/subs): Warn when trying to mark an sub with the same status again
| -rw-r--r-- | crates/yt/src/storage/db/insert/subscription.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crates/yt/src/storage/db/insert/subscription.rs b/crates/yt/src/storage/db/insert/subscription.rs index 54409a9..3a79b53 100644 --- a/crates/yt/src/storage/db/insert/subscription.rs +++ b/crates/yt/src/storage/db/insert/subscription.rs @@ -110,7 +110,13 @@ impl Subscription { } pub(crate) fn set_is_active(self, is_active: bool, ops: &mut Operations<Operation>) { - if self.is_active != is_active { + if self.is_active == is_active { + println!( + "Subscription '{}' is already marked '{}'", + self.name, + if is_active { "active" } else { "inactive" } + ); + } else { ops.push(Operation::SetIsActive { target: self, is_active, |
