Skip to content

Commit e791424

Browse files
committed
Add more #[inline] to PackedOption
1 parent 0660b26 commit e791424

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crates/bevy_utils/src/packed_option.rs

+2
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,15 @@ impl<T: NoneValue> PackedOption<T> {
111111
}
112112

113113
/// Takes the value out of the packed option, leaveing `None` in its place.
114+
#[inline]
114115
pub fn take(&mut self) -> PackedOption<T> {
115116
std::mem::take(self)
116117
}
117118
}
118119

119120
impl<T: NoneValue> Default for PackedOption<T> {
120121
/// Create a default packed option representing `None`.
122+
#[inline]
121123
fn default() -> Self {
122124
Self(<T as NoneValue>::NONE_VALUE)
123125
}

0 commit comments

Comments
 (0)