Skip to content

Commit

Permalink
refactor(data_structures): CodeBuffer::print_bytes_unchecked take a…
Browse files Browse the repository at this point in the history
… byte slice
  • Loading branch information
overlookmotel committed Feb 24, 2025
1 parent d6f51fd commit 779b293
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/oxc_data_structures/src/code_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,8 @@ impl CodeBuffer {
///
/// [`print_byte_unchecked`]: CodeBuffer::print_byte_unchecked
#[inline]
pub unsafe fn print_bytes_unchecked<I>(&mut self, bytes: I)
where
I: IntoIterator<Item = u8>,
{
self.buf.extend(bytes);
pub unsafe fn print_bytes_unchecked(&mut self, bytes: &[u8]) {
self.buf.extend_from_slice(bytes);
}

/// Print `n` tab characters into the buffer (indentation).
Expand Down

0 comments on commit 779b293

Please sign in to comment.