Skip to content

Commit 647d845

Browse files
authored
Remove mut self reference from LogExporter::export() method. (open-telemetry#2380)
1 parent b119b4d commit 647d845

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

benches/logs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct NoopExporter {
3434

3535
#[async_trait]
3636
impl LogExporter for NoopExporter {
37-
async fn export(&mut self, _: LogBatch<'_>) -> LogResult<()> {
37+
async fn export(&self, _: LogBatch<'_>) -> LogResult<()> {
3838
LogResult::Ok(())
3939
}
4040

src/layer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ mod tests {
247247

248248
#[async_trait]
249249
impl LogExporter for ReentrantLogExporter {
250-
async fn export(&mut self, _batch: LogBatch<'_>) -> LogResult<()> {
250+
async fn export(&self, _batch: LogBatch<'_>) -> LogResult<()> {
251251
// This will cause a deadlock as the export itself creates a log
252252
// while still within the lock of the SimpleLogProcessor.
253253
warn!(name: "my-event-name", target: "reentrant", event_id = 20, user_name = "otel", user_email = "[email protected]");

0 commit comments

Comments
 (0)