File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed
benches/benches/bevy_ecs/scheduling Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ pub fn build_schedule(criterion: &mut Criterion) {
69
69
struct DummyLabel ;
70
70
71
71
impl SystemLabel for NumLabel {
72
+ #[ inline]
72
73
fn data ( & self ) -> u16 {
73
74
self . 0
74
75
}
Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ pub fn derive_label(
228
228
229
229
( quote ! {
230
230
impl #impl_generics #trait_path for #ident #ty_generics #where_clause {
231
+ #[ inline]
231
232
fn data( & self ) -> u16 {
232
233
#data
233
234
}
Original file line number Diff line number Diff line change @@ -101,13 +101,16 @@ impl<'a> StuffedStr<'a> {
101
101
}
102
102
}
103
103
104
+ #[ inline]
104
105
fn len ( & self ) -> usize {
105
106
self . meta >> 16
106
107
}
108
+ #[ inline]
107
109
pub fn data ( & self ) -> u16 {
108
110
let data = self . meta & Self :: DATA_MASK ;
109
111
data as u16
110
112
}
113
+ #[ inline]
111
114
pub fn as_str ( & self ) -> & ' a str {
112
115
// SAFETY: this instance was constructed from a string slice of length `len`, and lifetime `'a`.
113
116
// It is sound to convert it back to a slice.
@@ -161,6 +164,7 @@ macro_rules! define_label {
161
164
$id_name( ty, stuffed)
162
165
}
163
166
/// Returns the [`TypeId`] used to differentiate labels.
167
+ #[ inline]
164
168
fn type_id( & self ) -> :: core:: any:: TypeId {
165
169
:: core:: any:: TypeId :: of:: <Self >( )
166
170
}
@@ -174,12 +178,15 @@ macro_rules! define_label {
174
178
}
175
179
176
180
impl $label_name for $id_name {
181
+ #[ inline]
177
182
fn as_label( & self ) -> Self {
178
183
* self
179
184
}
185
+ #[ inline]
180
186
fn type_id( & self ) -> :: core:: any:: TypeId {
181
187
self . 0
182
188
}
189
+ #[ inline]
183
190
fn data( & self ) -> u16 {
184
191
self . 1 . data( )
185
192
}
You can’t perform that action at this time.
0 commit comments