File tree 3 files changed +9
-0
lines changed
benches/benches/bevy_ecs/scheduling
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 @@ -91,13 +91,16 @@ impl<'a> StuffedStr<'a> {
91
91
}
92
92
}
93
93
94
+ #[ inline]
94
95
fn len ( & self ) -> usize {
95
96
self . meta >> 16
96
97
}
98
+ #[ inline]
97
99
pub fn data ( & self ) -> u16 {
98
100
let data = self . meta & Self :: DATA_MASK ;
99
101
data as u16
100
102
}
103
+ #[ inline]
101
104
pub fn as_str ( & self ) -> & ' a str {
102
105
// SAFETY: this instance was constructed from a string slice of length `len`, and lifetime `'a`.
103
106
// It is sound to convert it back to a slice.
@@ -151,6 +154,7 @@ macro_rules! define_label {
151
154
$id_name( ty, stuffed)
152
155
}
153
156
/// Returns the [`TypeId`] used to differentiate labels.
157
+ #[ inline]
154
158
fn type_id( & self ) -> :: core:: any:: TypeId {
155
159
:: core:: any:: TypeId :: of:: <Self >( )
156
160
}
@@ -164,12 +168,15 @@ macro_rules! define_label {
164
168
}
165
169
166
170
impl $label_name for $id_name {
171
+ #[ inline]
167
172
fn as_label( & self ) -> Self {
168
173
* self
169
174
}
175
+ #[ inline]
170
176
fn type_id( & self ) -> :: core:: any:: TypeId {
171
177
self . 0
172
178
}
179
+ #[ inline]
173
180
fn data( & self ) -> u16 {
174
181
self . 1 . data( )
175
182
}
You can’t perform that action at this time.
0 commit comments