Skip to content

Commit

Permalink
Avoid method only available since Rust 1.73.
Browse files Browse the repository at this point in the history
  • Loading branch information
mstyura committed Jun 5, 2024
1 parent 8bf2c84 commit a108a2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion opentelemetry-datadog/src/exporter/intern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ impl<'a> StringInterner<'a> {
static BUFFER: RefCell<Vec<u8>> = RefCell::new(Vec::with_capacity(4096));
}

BUFFER.with_borrow_mut(|reusable_buffer| {
BUFFER.with(|cell| {
let reusable_buffer = &mut cell.borrow_mut();
rmp::encode::write_array_len(payload, self.data.len() as u32)?;
for data in self.data.iter() {
data.write_as_str(payload, reusable_buffer)?;
Expand Down

0 comments on commit a108a2d

Please sign in to comment.