Skip to content

Commit 49eaa0f

Browse files
committed
Mark Cell::replace() as #[inline]
1 parent 744e397 commit 49eaa0f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: 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)