Use #[inline(always)] only when relatively certain.

This commit is contained in:
Stephen Chung
2021-10-21 17:26:43 +08:00
parent 313999b0ac
commit 9c16d90de9
21 changed files with 129 additions and 122 deletions

View File

@@ -57,7 +57,7 @@ impl<'a> ArgBackup<'a> {
/// # Panics
///
/// Panics when `args` is empty.
#[inline(always)]
#[inline]
fn change_first_arg_to_copy(&mut self, args: &mut FnCallArgs<'a>) {
// Clone the original value.
self.value_copy = args[0].clone();
@@ -91,7 +91,7 @@ impl<'a> ArgBackup<'a> {
}
impl Drop for ArgBackup<'_> {
#[inline(always)]
#[inline]
fn drop(&mut self) {
// Panic if the shorter lifetime leaks.
assert!(