Skip to content

Commit 4206d37

Browse files
committed
Auto merge of #102548 - nikic:inline-cell-replace, r=scottmcm
Mark Cell::replace() as #[inline] Giving this a try based on rust-lang/rust#102539 (comment).
2 parents c138c24 + d7d9062 commit 4206d37

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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)