@@ -45,6 +45,7 @@ macro_rules! vectors {
45
45
}
46
46
47
47
impl OptionIntoWasmAbi for Box <[ $t] > {
48
+ #[ inline]
48
49
fn none( ) -> WasmSlice { null_slice( ) }
49
50
}
50
51
@@ -60,6 +61,7 @@ macro_rules! vectors {
60
61
}
61
62
62
63
impl OptionFromWasmAbi for Box <[ $t] > {
64
+ #[ inline]
63
65
fn is_none( slice: & WasmSlice ) -> bool { slice. ptr == 0 }
64
66
}
65
67
}
@@ -77,6 +79,7 @@ macro_rules! vectors {
77
79
}
78
80
79
81
impl <' a> OptionIntoWasmAbi for & ' a [ $t] {
82
+ #[ inline]
80
83
fn none( ) -> WasmSlice { null_slice( ) }
81
84
}
82
85
@@ -90,6 +93,7 @@ macro_rules! vectors {
90
93
}
91
94
92
95
impl <' a> OptionIntoWasmAbi for & ' a mut [ $t] {
96
+ #[ inline]
93
97
fn none( ) -> WasmSlice { null_slice( ) }
94
98
}
95
99
@@ -144,24 +148,28 @@ if_std! {
144
148
impl <T > IntoWasmAbi for Vec <T > where Box <[ T ] >: IntoWasmAbi <Abi = WasmSlice > {
145
149
type Abi = <Box <[ T ] > as IntoWasmAbi >:: Abi ;
146
150
151
+ #[ inline]
147
152
fn into_abi( self ) -> Self :: Abi {
148
153
self . into_boxed_slice( ) . into_abi( )
149
154
}
150
155
}
151
156
152
157
impl <T > OptionIntoWasmAbi for Vec <T > where Box <[ T ] >: IntoWasmAbi <Abi = WasmSlice > {
158
+ #[ inline]
153
159
fn none( ) -> WasmSlice { null_slice( ) }
154
160
}
155
161
156
162
impl <T > FromWasmAbi for Vec <T > where Box <[ T ] >: FromWasmAbi <Abi = WasmSlice > {
157
163
type Abi = <Box <[ T ] > as FromWasmAbi >:: Abi ;
158
164
165
+ #[ inline]
159
166
unsafe fn from_abi( js: Self :: Abi ) -> Self {
160
167
<Box <[ T ] >>:: from_abi( js) . into( )
161
168
}
162
169
}
163
170
164
171
impl <T > OptionFromWasmAbi for Vec <T > where Box <[ T ] >: FromWasmAbi <Abi = WasmSlice > {
172
+ #[ inline]
165
173
fn is_none( abi: & WasmSlice ) -> bool { abi. ptr == 0 }
166
174
}
167
175
@@ -177,6 +185,7 @@ if_std! {
177
185
}
178
186
179
187
impl OptionIntoWasmAbi for String {
188
+ #[ inline]
180
189
fn none( ) -> Self :: Abi { null_slice( ) }
181
190
}
182
191
@@ -190,6 +199,7 @@ if_std! {
190
199
}
191
200
192
201
impl OptionFromWasmAbi for String {
202
+ #[ inline]
193
203
fn is_none( slice: & WasmSlice ) -> bool { slice. ptr == 0 }
194
204
}
195
205
}
@@ -206,6 +216,7 @@ impl<'a> IntoWasmAbi for &'a str {
206
216
}
207
217
208
218
impl < ' a > OptionIntoWasmAbi for & ' a str {
219
+ #[ inline]
209
220
fn none ( ) -> Self :: Abi {
210
221
null_slice ( )
211
222
}
@@ -240,6 +251,7 @@ if_std! {
240
251
}
241
252
242
253
impl OptionIntoWasmAbi for Box <[ JsValue ] > {
254
+ #[ inline]
243
255
fn none( ) -> WasmSlice { null_slice( ) }
244
256
}
245
257
@@ -255,6 +267,7 @@ if_std! {
255
267
}
256
268
257
269
impl OptionFromWasmAbi for Box <[ JsValue ] > {
270
+ #[ inline]
258
271
fn is_none( slice: & WasmSlice ) -> bool { slice. ptr == 0 }
259
272
}
260
273
}
0 commit comments