Skip to content

Commit

Permalink
Add inlines per feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
clarfonthey committed Nov 6, 2024
1 parent cc0947a commit 4f75078
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/control/tag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ pub(crate) trait TagSliceExt {
fn fill_tag(&mut self, tag: Tag);

/// Clears out the control.
#[inline]
fn fill_empty(&mut self) {
self.fill_tag(Tag::EMPTY)
}
}
impl TagSliceExt for [Tag] {
#[inline]
fn fill_tag(&mut self, tag: Tag) {
// SAFETY: We have access to the entire slice, so, we can write to the entire slice.
unsafe { self.as_mut_ptr().write_bytes(tag.0, self.len()) }
Expand Down

0 comments on commit 4f75078

Please sign in to comment.