Add some more #[inline] annotations for trivial functions (#2817)

Looking at some profiles these or their related functions were all
showing up, so this commit adds `#[inline]` to allow cross-crate
inlining by default.
This commit is contained in:
Alex Crichton
2021-04-08 12:23:54 -05:00
committed by GitHub
parent 5c4c03d278
commit c77ea0c5c7
5 changed files with 23 additions and 0 deletions

View File

@@ -970,6 +970,7 @@ impl InstanceHandle {
/// of the internals, there's no lifetime tracking around its validity.
/// You'll need to ensure that the returned handles all go out of scope at
/// the same time.
#[inline]
pub unsafe fn clone(&self) -> InstanceHandle {
InstanceHandle {
instance: self.instance,