Skip to content

Commit adaece3

Browse files
author
Andrew J Westlake
committed
Fixed leftover deprecation warning
1 parent afe74b1 commit adaece3

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

pytests/test_async_std_uvloop.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ fn main() -> pyo3::PyResult<()> {
1313
pyo3_asyncio::async_std::run(py, async move {
1414
// verify that we are on a uvloop.Loop
1515
Python::with_gil(|py| -> PyResult<()> {
16-
assert!(uvloop
17-
.as_ref(py)
18-
.getattr("Loop")?
19-
.downcast::<PyType>()
20-
.unwrap()
21-
.is_instance(pyo3_asyncio::async_std::get_current_loop(py)?)?);
16+
assert!(pyo3_asyncio::async_std::get_current_loop(py)?.is_instance(
17+
uvloop
18+
.as_ref(py)
19+
.getattr("Loop")?
20+
.downcast::<PyType>()
21+
.unwrap()
22+
)?);
2223
Ok(())
2324
})?;
2425

0 commit comments

Comments
 (0)