From 3b32d71a8b4902b42a4401fbbe0a354137a3e1fa Mon Sep 17 00:00:00 2001 From: Ivan Kalinin Date: Fri, 5 Apr 2024 13:57:05 +0200 Subject: [PATCH] Bump version --- .github/workflows/CI.yml | 1 - Cargo.lock | 2 +- Cargo.toml | 2 +- pyproject.toml | 2 +- src/transport.rs | 24 +++++++++--------------- 5 files changed, 12 insertions(+), 19 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1d47ec8..183f348 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -71,4 +71,3 @@ jobs: with: name: wheels path: dist - diff --git a/Cargo.lock b/Cargo.lock index 4f127a4..97ded4e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -922,7 +922,7 @@ dependencies = [ [[package]] name = "nekoton-python" -version = "0.1.16" +version = "0.1.17" dependencies = [ "ahash 0.8.3", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index 0460fbf..3d2ebaf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nekoton-python" -version = "0.1.16" +version = "0.1.17" edition = "2021" [lib] diff --git a/pyproject.toml b/pyproject.toml index 04bb471..e74e1e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["maturin>=0.14,<0.15"] +requires = ["maturin>=1.0,<2.0"] build-backend = "maturin" [tool.maturin] diff --git a/src/transport.rs b/src/transport.rs index a4e9165..5ce38f2 100644 --- a/src/transport.rs +++ b/src/transport.rs @@ -863,7 +863,7 @@ impl AccountStatesAsyncIter { pub fn __anext__<'a>(&'a mut self, py: Python<'a>) -> PyResult> { let state = self.0.clone(); - match pyo3_asyncio::tokio::future_into_py(py, async move { + pyo3_asyncio::tokio::future_into_py(py, async move { let mut state = state.lock().await; match &*state { AccountStatesAsyncIterState::Closed => { @@ -905,10 +905,8 @@ impl AccountStatesAsyncIter { } _ => unreachable!(), } - }) { - Ok(awaitable) => Ok(Some(awaitable)), - Err(e) => Err(e), - } + }) + .map(Some) } } @@ -981,7 +979,7 @@ impl AccountTransactionsAsyncIter { pub fn __anext__<'a>(&'a mut self, py: Python<'a>) -> PyResult> { let state = self.0.clone(); - match pyo3_asyncio::tokio::future_into_py(py, async move { + pyo3_asyncio::tokio::future_into_py(py, async move { let mut state = state.lock().await; match &*state { AccountTransactionsAsyncIterState::Closed => { @@ -1013,10 +1011,8 @@ impl AccountTransactionsAsyncIter { }, _ => unreachable!(), } - }) { - Ok(awaitable) => Ok(Some(awaitable)), - Err(e) => Err(e), - } + }) + .map(Some) } } @@ -1147,7 +1143,7 @@ impl TraceTransaction { pub fn __anext__<'a>(&'a mut self, py: Python<'a>) -> PyResult> { let state = self.0.clone(); - match pyo3_asyncio::tokio::future_into_py(py, async move { + pyo3_asyncio::tokio::future_into_py(py, async move { let mut state = state.lock().await; if let Some(root) = state.root.take() { state.yield_root = false; @@ -1161,10 +1157,8 @@ impl TraceTransaction { } None => Err(PyStopAsyncIteration::new_err(())), } - }) { - Ok(awaitable) => Ok(Some(awaitable)), - Err(e) => Err(e), - } + }) + .map(Some) } }