From 8b080f2f4300c61d41040467f84a88739b811706 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Fri, 5 Apr 2024 23:01:11 +0200 Subject: [PATCH] feat: return with sqlx Signed-off-by: kjuulh --- crates/cuddle-ci/src/rust_service/sqlx.rs | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/crates/cuddle-ci/src/rust_service/sqlx.rs b/crates/cuddle-ci/src/rust_service/sqlx.rs index d91ffe2..d6f652a 100644 --- a/crates/cuddle-ci/src/rust_service/sqlx.rs +++ b/crates/cuddle-ci/src/rust_service/sqlx.rs @@ -62,29 +62,20 @@ impl DaggerMiddleware for Sqlx { } pub trait SqlxExt { - fn with_sqlx(&mut self) -> &mut Self { - self - } - - fn with_sqlx_migrations(&mut self, path: impl Into) -> &mut Self { - self - } + fn with_sqlx(&mut self) -> &mut Self; + fn with_sqlx_migrations(&mut self, path: impl Into) -> &mut Self; } impl SqlxExt for RustService { fn with_sqlx(&mut self) -> &mut Self { self.with_stage(super::RustServiceStage::BeforeBuild(Arc::new(Sqlx::new( self.client.clone(), - )))); - - self + )))) } fn with_sqlx_migrations(&mut self, path: impl Into) -> &mut Self { self.with_stage(super::RustServiceStage::BeforeBuild(Arc::new( Sqlx::new(self.client.clone()).with_migration_path(path), - ))); - - self + ))) } }