Skip to content

Commit 625c2ad

Browse files
committed
Code changes
1 parent 83f65ca commit 625c2ad

File tree

1 file changed

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

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ pub struct LogBatch<'a> {
2323

2424
/// The `LogBatchData` enum represents the data field of a `LogBatch`.
2525
/// It can either be:
26-
/// - A mutable reference to a vector of tuples, where each tuple consists of a `LogRecord` and an `InstrumentationScope`.
26+
/// - A shared reference to a vector of tuples, where each tuple consists of a `LogRecord` and an `InstrumentationScope`.
2727
/// - Or it can be a slice of tuples, where each tuple consists of a reference to a `LogRecord` and a reference to an `InstrumentationScope`.
2828
#[derive(Debug)]
2929
#[allow(clippy::vec_box)] // TODO: Revisit this. Clippy complains about using Box in a Vec, but it's done here for performant moves of the data between channel and the vec.
3030
enum LogBatchData<'a> {
31-
BorrowedVec(&'a mut Vec<Box<(LogRecord, InstrumentationScope)>>), // Used by BatchProcessor which clones the LogRecords for its own use.
31+
BorrowedVec(&'a Vec<Box<(LogRecord, InstrumentationScope)>>), // Used by BatchProcessor which clones the LogRecords for its own use.
3232
BorrowedSlice(&'a [(&'a LogRecord, &'a InstrumentationScope)]),
3333
}
3434

@@ -53,9 +53,9 @@ impl<'a> LogBatch<'a> {
5353
}
5454
}
5555

56-
#[allow(clippy::vec_box)] // TODO: Revisit this. Clippy complains about using Box in a Vec, but it's done here for performant moves of the data between channel and the vec.
56+
#[allow(clippy::vec_box)] // Clippy complains about using Box in a Vec, but it's done here for performant moves of the data between channel and the vec.
5757
pub(crate) fn new_with_owned_data(
58-
data: &'a mut Vec<Box<(LogRecord, InstrumentationScope)>>,
58+
data: &'a Vec<Box<(LogRecord, InstrumentationScope)>>,
5959
) -> LogBatch<'a> {
6060
LogBatch {
6161
data: LogBatchData::BorrowedVec(data),

0 commit comments

Comments
 (0)