Skip to content

Commit 756e7be

Browse files
committed
Auto merge of #102548 - nikic:inline-cell-replace, r=scottmcm
Mark Cell::replace() as #[inline] Giving this a try based on #102539 (comment).
2 parents c2590e6 + 49eaa0f commit 756e7be

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/core/src/cell.rs

+1
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ impl<T> Cell<T> {
405405
/// assert_eq!(cell.replace(10), 5);
406406
/// assert_eq!(cell.get(), 10);
407407
/// ```
408+
#[inline]
408409
#[stable(feature = "move_cell", since = "1.17.0")]
409410
pub fn replace(&self, val: T) -> T {
410411
// SAFETY: This can cause data races if called from a separate thread,

0 commit comments

Comments
 (0)