diff --git a/src/message.rs b/src/message.rs index 44c209b3c..96f0195c9 100644 --- a/src/message.rs +++ b/src/message.rs @@ -438,7 +438,7 @@ impl<'a> Message for BorrowedMessage<'a> { fn topic(&self) -> &str { unsafe { - CStr::from_ptr(rdsys::rd_kafka_topic_name((self.ptr).rkt)) + CStr::from_ptr(rdsys::rd_kafka_topic_name(self.ptr.rkt)) .to_str() .expect("Topic name is not valid UTF-8") } diff --git a/src/topic_partition_list.rs b/src/topic_partition_list.rs index 918921880..3a02af302 100644 --- a/src/topic_partition_list.rs +++ b/src/topic_partition_list.rs @@ -327,7 +327,7 @@ impl TopicPartitionList { /// Returns all the elements of the list. pub fn elements(&self) -> Vec> { - let slice = unsafe { util::ptr_to_slice_mut((self.ptr).elems, self.count()) }; + let slice = unsafe { util::ptr_to_slice_mut(self.ptr.elems, self.count()) }; let mut vec = Vec::with_capacity(slice.len()); for elem_ptr in slice { vec.push(TopicPartitionListElem::from_ptr(self, &mut *elem_ptr)); @@ -337,7 +337,7 @@ impl TopicPartitionList { /// Returns all the elements of the list that belong to the specified topic. pub fn elements_for_topic<'a>(&'a self, topic: &str) -> Vec> { - let slice = unsafe { util::ptr_to_slice_mut((self.ptr).elems, self.count()) }; + let slice = unsafe { util::ptr_to_slice_mut(self.ptr.elems, self.count()) }; let mut vec = Vec::with_capacity(slice.len()); for elem_ptr in slice { let tp = TopicPartitionListElem::from_ptr(self, &mut *elem_ptr);