Add inline attributes for functions used in the query system
This commit is contained in:
parent
a80ec3b3b1
commit
87cdfb6e71
4 changed files with 4 additions and 0 deletions
|
|
@ -253,6 +253,7 @@ impl<T: 'static> LocalKey<T> {
|
|||
/// This function will still `panic!()` if the key is uninitialized and the
|
||||
/// key's initializer panics.
|
||||
#[stable(feature = "thread_local_try_with", since = "1.26.0")]
|
||||
#[inline]
|
||||
pub fn try_with<F, R>(&'static self, f: F) -> Result<R, AccessError>
|
||||
where
|
||||
F: FnOnce(&T) -> R,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue