From c2e72e5f0a812e6202d351dacb246cfb63d2dad8 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Sun, 28 May 2023 11:45:27 +0000 Subject: [PATCH] More inlines --- matter/src/secure_channel/case.rs | 1 + matter/src/secure_channel/core.rs | 1 + matter/src/secure_channel/pake.rs | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/matter/src/secure_channel/case.rs b/matter/src/secure_channel/case.rs index c029963..63d5e56 100644 --- a/matter/src/secure_channel/case.rs +++ b/matter/src/secure_channel/case.rs @@ -74,6 +74,7 @@ pub struct Case<'a> { } impl<'a> Case<'a> { + #[inline(always)] pub fn new(fabric_mgr: &'a RefCell, rand: Rand) -> Self { Self { fabric_mgr, rand } } diff --git a/matter/src/secure_channel/core.rs b/matter/src/secure_channel/core.rs index c2fe059..7287ae0 100644 --- a/matter/src/secure_channel/core.rs +++ b/matter/src/secure_channel/core.rs @@ -41,6 +41,7 @@ pub struct SecureChannel<'a> { } impl<'a> SecureChannel<'a> { + #[inline(always)] pub fn new( pase: &'a RefCell, fabric_mgr: &'a RefCell, diff --git a/matter/src/secure_channel/pake.rs b/matter/src/secure_channel/pake.rs index cd0ffaf..ab09512 100644 --- a/matter/src/secure_channel/pake.rs +++ b/matter/src/secure_channel/pake.rs @@ -43,7 +43,6 @@ enum PaseMgrState { Disabled, } -// Could this lock be avoided? pub struct PaseMgr { state: PaseMgrState, epoch: Epoch, @@ -51,6 +50,7 @@ pub struct PaseMgr { } impl PaseMgr { + #[inline(always)] pub fn new(epoch: Epoch, rand: Rand) -> Self { Self { state: PaseMgrState::Disabled,