Skip to content

Commit

Permalink
Inline Scalar::new
Browse files Browse the repository at this point in the history
While investigating some code bloat issues, I noticed calls to
`Scalar::new`, which there shouldn't be as this is a trivial newtype.
  • Loading branch information
nickbabcock committed Dec 20, 2023
1 parent 5cd69ae commit 7853832
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ pub struct Scalar<'a> {

impl<'a> Scalar<'a> {
/// Create a new scalar backed by a byte slice
#[inline]
pub fn new(data: &'a [u8]) -> Scalar<'a> {
Scalar { data }
}
Expand Down

0 comments on commit 7853832

Please sign in to comment.