From ce723ff72d5906e2b383e6f0ea0ba979a409c7ae Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Mon, 23 Dec 2019 12:01:40 -0600 Subject: [PATCH] Fix warnings emitted by rustc 1.40. Remove `#[inline]` from trait definitions. During review, we found one `#[inline]` that should be `#[inline(always)]` in sha2.rs. Fix that too. --- src/aead.rs | 1 - src/digest/sha2.rs | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/aead.rs b/src/aead.rs index 893b7c409f..7a05264cd2 100644 --- a/src/aead.rs +++ b/src/aead.rs @@ -57,7 +57,6 @@ pub trait BoundKey: core::fmt::Debug { fn new(key: UnboundKey, nonce_sequence: N) -> Self; /// The key's AEAD algorithm. - #[inline] fn algorithm(&self) -> &'static Algorithm; } diff --git a/src/digest/sha2.rs b/src/digest/sha2.rs index 878914c20f..fadaa33d23 100644 --- a/src/digest/sha2.rs +++ b/src/digest/sha2.rs @@ -159,10 +159,8 @@ pub(super) trait Word: type InputBytes: Copy; - #[inline(always)] fn from_be_bytes(input: Self::InputBytes) -> Self; - #[inline] fn rotr(self, count: u32) -> Self; } @@ -275,11 +273,12 @@ impl Word for Wrapping { const ZERO: Self = Wrapping(0); type InputBytes = [u8; 8]; + #[inline(always)] fn from_be_bytes(input: Self::InputBytes) -> Self { Wrapping(u64::from_be_bytes(input)) } - #[inline] + #[inline(always)] fn rotr(self, count: u32) -> Self { Wrapping(self.0.rotate_right(count)) }