Skip to content

Commit

Permalink
refactor: rewrite redundant_async_block
Browse files Browse the repository at this point in the history
  • Loading branch information
cmackenzie1 authored and rtyler committed Jun 2, 2023
1 parent b17f286 commit 3ddb146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl RawDeltaTable {
cmd = cmd.with_retention_period(Duration::hours(retention_period as i64));
}
let (table, metrics) = rt()?
.block_on(async { cmd.await })
.block_on(cmd.into_future())
.map_err(PyDeltaTableError::from_raw)?;
self._table.state = table.state;
Ok(metrics.files_deleted)
Expand All @@ -328,7 +328,7 @@ impl RawDeltaTable {
cmd = cmd.with_filters(&converted_filters);

let (table, metrics) = rt()?
.block_on(async { cmd.await })
.block_on(cmd.into_future())
.map_err(PyDeltaTableError::from_raw)?;
self._table.state = table.state;
Ok(serde_json::to_string(&metrics).unwrap())
Expand Down

0 comments on commit 3ddb146

Please sign in to comment.