diff options
Diffstat (limited to 'third_party/rust/interrupt-support/src/sql.rs')
-rw-r--r-- | third_party/rust/interrupt-support/src/sql.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/third_party/rust/interrupt-support/src/sql.rs b/third_party/rust/interrupt-support/src/sql.rs index 6f361013fc..a9f10f8cf8 100644 --- a/third_party/rust/interrupt-support/src/sql.rs +++ b/third_party/rust/interrupt-support/src/sql.rs @@ -120,3 +120,10 @@ impl Interruptee for SqlInterruptScope { self.was_interrupted() } } + +// Needed to allow Weak<SqlInterruptHandle> to be passed to `interrupt::register_interrupt` +impl AsRef<SqlInterruptHandle> for SqlInterruptHandle { + fn as_ref(&self) -> &SqlInterruptHandle { + self + } +} |