Skip to content

Commit 798d107

Browse files
authored
Return &mut Self from the migrator set_ methods (#3526)
1 parent 7f72829 commit 798d107

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sqlx-core/src/migrate/migrator.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl Migrator {
102102
}
103103

104104
/// Specify whether applied migrations that are missing from the resolved migrations should be ignored.
105-
pub fn set_ignore_missing(&mut self, ignore_missing: bool) -> &Self {
105+
pub fn set_ignore_missing(&mut self, ignore_missing: bool) -> &mut Self {
106106
self.ignore_missing = ignore_missing;
107107
self
108108
}
@@ -115,7 +115,7 @@ impl Migrator {
115115
///
116116
/// This should only be used if the database does not support locking, e.g. CockroachDB which talks the Postgres
117117
/// protocol but does not support advisory locks used by SQLx's migrations support for Postgres.
118-
pub fn set_locking(&mut self, locking: bool) -> &Self {
118+
pub fn set_locking(&mut self, locking: bool) -> &mut Self {
119119
self.locking = locking;
120120
self
121121
}

0 commit comments

Comments
 (0)