Deinline all session global functions.
These are all called very rarely, so there is no need for them to be inline.
This commit is contained in:
parent
f405ce86c2
commit
edb357f912
@ -119,7 +119,6 @@ pub fn new(edition: Edition) -> SessionGlobals {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn create_session_globals_then<R>(edition: Edition, f: impl FnOnce() -> R) -> R {
|
||||
assert!(
|
||||
!SESSION_GLOBALS.is_set(),
|
||||
@ -130,7 +129,6 @@ pub fn create_session_globals_then<R>(edition: Edition, f: impl FnOnce() -> R) -
|
||||
SESSION_GLOBALS.set(&session_globals, f)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_session_globals_then<R>(session_globals: &SessionGlobals, f: impl FnOnce() -> R) -> R {
|
||||
assert!(
|
||||
!SESSION_GLOBALS.is_set(),
|
||||
@ -140,7 +138,6 @@ pub fn set_session_globals_then<R>(session_globals: &SessionGlobals, f: impl FnO
|
||||
SESSION_GLOBALS.set(session_globals, f)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn create_default_session_if_not_set_then<R, F>(f: F) -> R
|
||||
where
|
||||
F: FnOnce(&SessionGlobals) -> R,
|
||||
@ -148,7 +145,6 @@ pub fn create_default_session_if_not_set_then<R, F>(f: F) -> R
|
||||
create_session_if_not_set_then(edition::DEFAULT_EDITION, f)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn create_session_if_not_set_then<R, F>(edition: Edition, f: F) -> R
|
||||
where
|
||||
F: FnOnce(&SessionGlobals) -> R,
|
||||
@ -161,7 +157,6 @@ pub fn create_session_if_not_set_then<R, F>(edition: Edition, f: F) -> R
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn with_session_globals<R, F>(f: F) -> R
|
||||
where
|
||||
F: FnOnce(&SessionGlobals) -> R,
|
||||
@ -169,7 +164,6 @@ pub fn with_session_globals<R, F>(f: F) -> R
|
||||
SESSION_GLOBALS.with(f)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn create_default_session_globals_then<R>(f: impl FnOnce() -> R) -> R {
|
||||
create_session_globals_then(edition::DEFAULT_EDITION, f)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user