From 798d1075a772d12b8538c48919e78e3bc5a50ec9 Mon Sep 17 00:00:00 2001 From: Nipunn Koorapati Date: Mon, 30 Jun 2025 17:13:26 -0700 Subject: [PATCH] Return &mut Self from the migrator set_ methods (#3526) --- sqlx-core/src/migrate/migrator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlx-core/src/migrate/migrator.rs b/sqlx-core/src/migrate/migrator.rs index 0f5cfb3f..1ae48131 100644 --- a/sqlx-core/src/migrate/migrator.rs +++ b/sqlx-core/src/migrate/migrator.rs @@ -102,7 +102,7 @@ impl Migrator { } /// Specify whether applied migrations that are missing from the resolved migrations should be ignored. - pub fn set_ignore_missing(&mut self, ignore_missing: bool) -> &Self { + pub fn set_ignore_missing(&mut self, ignore_missing: bool) -> &mut Self { self.ignore_missing = ignore_missing; self } @@ -115,7 +115,7 @@ impl Migrator { /// /// This should only be used if the database does not support locking, e.g. CockroachDB which talks the Postgres /// protocol but does not support advisory locks used by SQLx's migrations support for Postgres. - pub fn set_locking(&mut self, locking: bool) -> &Self { + pub fn set_locking(&mut self, locking: bool) -> &mut Self { self.locking = locking; self }