More inlines

This commit is contained in:
ivmarkov 2023-05-28 11:45:27 +00:00
parent dcbfa1f0e3
commit c2e72e5f0a
3 changed files with 3 additions and 1 deletions

View file

@ -74,6 +74,7 @@ pub struct Case<'a> {
} }
impl<'a> Case<'a> { impl<'a> Case<'a> {
#[inline(always)]
pub fn new(fabric_mgr: &'a RefCell<FabricMgr>, rand: Rand) -> Self { pub fn new(fabric_mgr: &'a RefCell<FabricMgr>, rand: Rand) -> Self {
Self { fabric_mgr, rand } Self { fabric_mgr, rand }
} }

View file

@ -41,6 +41,7 @@ pub struct SecureChannel<'a> {
} }
impl<'a> SecureChannel<'a> { impl<'a> SecureChannel<'a> {
#[inline(always)]
pub fn new( pub fn new(
pase: &'a RefCell<PaseMgr>, pase: &'a RefCell<PaseMgr>,
fabric_mgr: &'a RefCell<FabricMgr>, fabric_mgr: &'a RefCell<FabricMgr>,

View file

@ -43,7 +43,6 @@ enum PaseMgrState {
Disabled, Disabled,
} }
// Could this lock be avoided?
pub struct PaseMgr { pub struct PaseMgr {
state: PaseMgrState, state: PaseMgrState,
epoch: Epoch, epoch: Epoch,
@ -51,6 +50,7 @@ pub struct PaseMgr {
} }
impl PaseMgr { impl PaseMgr {
#[inline(always)]
pub fn new(epoch: Epoch, rand: Rand) -> Self { pub fn new(epoch: Epoch, rand: Rand) -> Self {
Self { Self {
state: PaseMgrState::Disabled, state: PaseMgrState::Disabled,