Skip to content

Commit 7e84c98

Browse files
authored
Merge branch 'main' into fix-metrics-u64-serialization
2 parents 940b0ee + 42b4f2f commit 7e84c98

File tree

1 file changed

+6
-6
lines changed
  • opentelemetry-sdk/src/export/logs

1 file changed

+6
-6
lines changed

opentelemetry-sdk/src/export/logs/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ pub struct LogBatch<'a> {
2727
/// - Or it can be a shared reference to a slice of tuples, where each tuple consists of a reference to a `LogRecord` and a reference to an `InstrumentationScope`.
2828
#[derive(Debug)]
2929
enum LogBatchData<'a> {
30-
BorrowedVec(&'a [Box<(LogRecord, InstrumentationScope)>]), // Used by BatchProcessor which clones the LogRecords for its own use.
31-
BorrowedSlice(&'a [(&'a LogRecord, &'a InstrumentationScope)]),
30+
SliceOfOwnedData(&'a [Box<(LogRecord, InstrumentationScope)>]), // Used by BatchProcessor which clones the LogRecords for its own use.
31+
SliceOfBorrowedData(&'a [(&'a LogRecord, &'a InstrumentationScope)]),
3232
}
3333

3434
impl<'a> LogBatch<'a> {
@@ -48,15 +48,15 @@ impl<'a> LogBatch<'a> {
4848
/// made private in the future.
4949
pub fn new(data: &'a [(&'a LogRecord, &'a InstrumentationScope)]) -> LogBatch<'a> {
5050
LogBatch {
51-
data: LogBatchData::BorrowedSlice(data),
51+
data: LogBatchData::SliceOfBorrowedData(data),
5252
}
5353
}
5454

5555
pub(crate) fn new_with_owned_data(
5656
data: &'a [Box<(LogRecord, InstrumentationScope)>],
5757
) -> LogBatch<'a> {
5858
LogBatch {
59-
data: LogBatchData::BorrowedVec(data),
59+
data: LogBatchData::SliceOfOwnedData(data),
6060
}
6161
}
6262
}
@@ -89,7 +89,7 @@ impl<'a> Iterator for LogBatchDataIter<'a> {
8989

9090
fn next(&mut self) -> Option<Self::Item> {
9191
match self.data {
92-
LogBatchData::BorrowedVec(data) => {
92+
LogBatchData::SliceOfOwnedData(data) => {
9393
if self.index < data.len() {
9494
let record = &*data[self.index];
9595
self.index += 1;
@@ -98,7 +98,7 @@ impl<'a> Iterator for LogBatchDataIter<'a> {
9898
None
9999
}
100100
}
101-
LogBatchData::BorrowedSlice(data) => {
101+
LogBatchData::SliceOfBorrowedData(data) => {
102102
if self.index < data.len() {
103103
let record = &data[self.index];
104104
self.index += 1;

0 commit comments

Comments
 (0)