Skip to content

Commit 3ce71dd

Browse files
committed
Rename struct.
1 parent 82d90e8 commit 3ce71dd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/producer/future_producer.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ pub struct FutureProducerContext<C: ClientContext + 'static> {
134134

135135
/// Contains information about a successfully delivered message
136136
#[derive(Debug, PartialEq, Eq)]
137-
pub struct DeliveredMessage {
137+
pub struct Delivery {
138138
/// The partition the message was delivered to
139139
pub partition: i32,
140140
/// The offset within the partition
@@ -148,7 +148,7 @@ pub struct DeliveredMessage {
148148
/// If message delivery was successful, returns `DeliveredMessage` containing the partition,
149149
/// offset and timestamp. If the message failed to be delivered, returns the error and
150150
/// an owned copy of the original message.
151-
pub type OwnedDeliveryResult = Result<DeliveredMessage, (KafkaError, OwnedMessage)>;
151+
pub type OwnedDeliveryResult = Result<Delivery, (KafkaError, OwnedMessage)>;
152152

153153
// Delegates all the methods calls to the wrapped context.
154154
impl<C: ClientContext + 'static> ClientContext for FutureProducerContext<C> {
@@ -192,7 +192,7 @@ where
192192
tx: Box<oneshot::Sender<OwnedDeliveryResult>>,
193193
) {
194194
let owned_delivery_result = match *delivery_result {
195-
Ok(ref message) => Ok(DeliveredMessage {
195+
Ok(ref message) => Ok(Delivery {
196196
partition: message.partition(),
197197
offset: message.offset(),
198198
timestamp: message.timestamp(),

0 commit comments

Comments
 (0)