Skip to content

Commit

Permalink
add inline attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Nov 23, 2021
1 parent d737a59 commit e89e13b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions digest/src/core_api/wrapper.rs
Expand Up @@ -89,13 +89,15 @@ where
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
{
#[inline]
fn new(key: &Key<Self>) -> Self {
Self {
core: T::new(key),
buffer: Default::default(),
}
}

#[inline]
fn new_from_slice(key: &[u8]) -> Result<Self, InvalidLength> {
Ok(Self {
core: T::new_from_slice(key)?,
Expand All @@ -110,6 +112,7 @@ where
T::BlockSize: IsLess<U256>,
Le<T::BlockSize, U256>: NonZero,
{
#[inline]
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
T::write_alg_name(f)?;
f.write_str(" { .. }")
Expand Down

0 comments on commit e89e13b

Please sign in to comment.