From 7ec9b549510db0e96d5d0b9019ee0e6689e3952d Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Fri, 18 Jul 2025 18:23:18 +0200 Subject: refactor(crates/yt/db/insert::Commitable): Make `Debug` a dependency This avoids having to copy the already implied dependency to every type bound. --- crates/yt/src/storage/db/insert/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/yt/src/storage/db/insert/mod.rs b/crates/yt/src/storage/db/insert/mod.rs index e83287a..a3139ac 100644 --- a/crates/yt/src/storage/db/insert/mod.rs +++ b/crates/yt/src/storage/db/insert/mod.rs @@ -11,23 +11,23 @@ pub(crate) mod playlist; pub(crate) mod subscription; pub(crate) mod video; -pub(crate) trait Committable: Sized { +pub(crate) trait Committable: Sized + std::fmt::Debug { async fn commit(self, txn: &mut SqliteConnection) -> Result<()>; } #[derive(Debug)] -pub(crate) struct Operations { +pub(crate) struct Operations { name: &'static str, ops: Vec, } -impl Default for Operations { +impl Default for Operations { fn default() -> Self { Self::new("") } } -impl Operations { +impl Operations { #[must_use] pub(crate) fn new(name: &'static str) -> Self { Self { @@ -62,7 +62,7 @@ impl Operations { } } -impl Drop for Operations { +impl Drop for Operations { fn drop(&mut self) { assert!( self.ops.is_empty(), -- cgit 1.4.1