Skip to content

Commit

Permalink
perf: Encourage inlining of Fixed::new
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jul 8, 2021
1 parent 039395f commit 3da29fb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/fixed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ macro_rules! fixed_string {
}

impl $name {
#[inline]
pub(crate) fn new(s: &str) -> Self {
debug_assert_eq!(s.as_bytes().len(), $len);
let mut array = [0; $len];
Expand Down

0 comments on commit 3da29fb

Please sign in to comment.