Skip to content

Commit

Permalink
rdkafka: fix the error type of DeliveryFuture
Browse files Browse the repository at this point in the history
Signed-off-by: Runji Wang <[email protected]>
  • Loading branch information
wangrunji0408 committed Sep 12, 2023
1 parent bb8f063 commit 2211f81
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions madsim-rdkafka/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ license = "Apache-2.0"
[target.'cfg(madsim)'.dependencies]
async-channel = "1"
async-trait = "0.1"
futures-channel = "0.3.0"
futures-util = "0.3"
madsim = { version = "0.2.8" }
serde = { version = "1", features = ["derive"] }
Expand Down
4 changes: 2 additions & 2 deletions madsim-rdkafka/src/sim/producer/future_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use crate::{
util::Timeout,
ClientConfig, ClientContext,
};
use futures_channel::oneshot;
use futures_util::FutureExt;
use tokio::sync::oneshot;

use std::future::Future;
use std::pin::Pin;
Expand Down Expand Up @@ -218,7 +218,7 @@ pub struct DeliveryFuture {

impl Future for DeliveryFuture {
// the original crate returns `futures_channel::oneshot::Canceled`.
type Output = Result<OwnedDeliveryResult, oneshot::error::RecvError>;
type Output = Result<OwnedDeliveryResult, oneshot::Canceled>;

fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
self.rx.poll_unpin(cx)
Expand Down

0 comments on commit 2211f81

Please sign in to comment.