Fix Rust’s confusing lifetime lint (#19118)

Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
This commit is contained in:
V02460
2025-10-31 12:09:13 +00:00
committed by GitHub
co-authored by Andrew Morgan
parent 3595ff921f
commit 07e7980572
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
Fix a lint error related to lifetimes in Rust 1.90.
+1 -1
View File
@@ -137,7 +137,7 @@ fn get_runtime<'a>(reactor: &Bound<'a, PyAny>) -> PyResult<PyRef<'a, PyTokioRunt
static DEFER: OnceCell<PyObject> = OnceCell::new();
/// Access to the `twisted.internet.defer` module.
fn defer(py: Python<'_>) -> PyResult<&Bound<PyAny>> {
fn defer(py: Python<'_>) -> PyResult<&Bound<'_, PyAny>> {
Ok(DEFER
.get_or_try_init(|| py.import("twisted.internet.defer").map(Into::into))?
.bind(py))