Skip to content

Commit 531e6d2

Browse files
committed
fixup! Fix panic in GroupInfo::members
1 parent daa10d3 commit 531e6d2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ impl<'a> Message for BorrowedMessage<'a> {
438438

439439
fn topic(&self) -> &str {
440440
unsafe {
441-
CStr::from_ptr(rdsys::rd_kafka_topic_name((self.ptr).rkt))
441+
CStr::from_ptr(rdsys::rd_kafka_topic_name(self.ptr.rkt))
442442
.to_str()
443443
.expect("Topic name is not valid UTF-8")
444444
}

src/topic_partition_list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ impl TopicPartitionList {
327327

328328
/// Returns all the elements of the list.
329329
pub fn elements(&self) -> Vec<TopicPartitionListElem<'_>> {
330-
let slice = unsafe { util::ptr_to_slice_mut((self.ptr).elems, self.count()) };
330+
let slice = unsafe { util::ptr_to_slice_mut(self.ptr.elems, self.count()) };
331331
let mut vec = Vec::with_capacity(slice.len());
332332
for elem_ptr in slice {
333333
vec.push(TopicPartitionListElem::from_ptr(self, &mut *elem_ptr));
@@ -337,7 +337,7 @@ impl TopicPartitionList {
337337

338338
/// Returns all the elements of the list that belong to the specified topic.
339339
pub fn elements_for_topic<'a>(&'a self, topic: &str) -> Vec<TopicPartitionListElem<'a>> {
340-
let slice = unsafe { util::ptr_to_slice_mut((self.ptr).elems, self.count()) };
340+
let slice = unsafe { util::ptr_to_slice_mut(self.ptr.elems, self.count()) };
341341
let mut vec = Vec::with_capacity(slice.len());
342342
for elem_ptr in slice {
343343
let tp = TopicPartitionListElem::from_ptr(self, &mut *elem_ptr);

0 commit comments

Comments
 (0)