Return &mut Self from the migrator set_ methods (#3526)

This commit is contained in:
Nipunn Koorapati 2025-06-30 17:13:26 -07:00 committed by GitHub
parent 7f728295b2
commit 798d1075a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
}