Skip to content

Commit

Permalink
#[inline(always)] for functions which are essentially single functi…
Browse files Browse the repository at this point in the history
…on calls
  • Loading branch information
ChaiTRex committed Aug 13, 2024
1 parent 91bec3a commit 539947a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions library/core/src/num/nonzero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1543,6 +1543,7 @@ macro_rules! nonzero_integer_signedness_dependent_methods {
#[rustc_const_unstable(feature = "isqrt", issue = "116226")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline(always)]
pub const fn isqrt(self) -> Self {
let result = self.get().isqrt();

Expand Down
2 changes: 1 addition & 1 deletion library/core/src/num/uint_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2675,7 +2675,7 @@ macro_rules! uint_impl {
#[rustc_const_unstable(feature = "isqrt", issue = "116226")]
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
#[inline(always)]
pub const fn isqrt(self) -> Self {
let result = crate::num::int_sqrt::$ActualT(self as $ActualT) as $SelfT;

Expand Down

0 comments on commit 539947a

Please sign in to comment.