@@ -43,7 +43,7 @@ impl FromScript for () {
4343
4444impl FromScript for bool {
4545 type This < ' w > = Self ;
46-
46+ # [ profiling :: function ]
4747 fn from_script (
4848 value : ScriptValue ,
4949 world : WorldGuard < ' _ > ,
@@ -67,6 +67,7 @@ macro_rules! impl_from_with_downcast {
6767 $(
6868 impl FromScript for $ty {
6969 type This <' w> = Self ;
70+ #[ profiling:: function]
7071 fn from_script( value: ScriptValue , world: WorldGuard ) -> Result <Self , InteropError > {
7172 match value {
7273 ScriptValue :: Integer ( i) => Ok ( i as $ty) ,
@@ -88,6 +89,7 @@ macro_rules! impl_from_stringlike {
8889 $(
8990 impl FromScript for $ty {
9091 type This <' w> = Self ;
92+ #[ profiling:: function]
9193 fn from_script( value: ScriptValue , world: WorldGuard ) -> Result <Self , InteropError > {
9294 match value {
9395 ScriptValue :: String ( s) => Ok ( s. to_string( ) . into( ) ) ,
@@ -104,7 +106,7 @@ impl_from_stringlike!(String, PathBuf, OsString);
104106
105107impl FromScript for char {
106108 type This < ' w > = Self ;
107-
109+ # [ profiling :: function ]
108110 fn from_script (
109111 value : ScriptValue ,
110112 world : WorldGuard < ' _ > ,
@@ -128,6 +130,7 @@ impl FromScript for char {
128130
129131impl FromScript for ReflectReference {
130132 type This < ' w > = Self ;
133+ #[ profiling:: function]
131134 fn from_script ( value : ScriptValue , _world : WorldGuard ) -> Result < Self , InteropError > {
132135 match value {
133136 ScriptValue :: Reference ( r) => Ok ( r) ,
@@ -178,6 +181,7 @@ impl<T> From<T> for Val<T> {
178181
179182impl < T : FromReflect > FromScript for Val < T > {
180183 type This < ' w > = Self ;
184+ #[ profiling:: function]
181185 fn from_script ( value : ScriptValue , world : WorldGuard ) -> Result < Self , InteropError > {
182186 match value {
183187 ScriptValue :: Reference ( reflect_reference) => Ok ( Val ( reflect_reference. with_reflect (
@@ -221,7 +225,7 @@ impl<T> Deref for Ref<'_, T> {
221225
222226impl < T : FromReflect > FromScript for Ref < ' _ , T > {
223227 type This < ' a > = Ref < ' a , T > ;
224-
228+ # [ profiling :: function ]
225229 fn from_script (
226230 value : ScriptValue ,
227231 world : WorldGuard < ' _ > ,
@@ -293,7 +297,7 @@ impl<'a, T> From<&'a mut T> for Mut<'a, T> {
293297
294298impl < T : FromReflect > FromScript for Mut < ' _ , T > {
295299 type This < ' w > = Mut < ' w , T > ;
296-
300+ # [ profiling :: function ]
297301 fn from_script (
298302 value : ScriptValue ,
299303 world : WorldGuard < ' _ > ,
@@ -331,7 +335,7 @@ where
331335 for < ' w > T :: This < ' w > : Into < T > ,
332336{
333337 type This < ' w > = Self ;
334-
338+ # [ profiling :: function ]
335339 fn from_script ( value : ScriptValue , world : WorldGuard ) -> Result < Self , InteropError > {
336340 match value {
337341 ScriptValue :: Unit => Ok ( None ) ,
@@ -345,7 +349,7 @@ where
345349 for < ' w > T :: This < ' w > : Into < T > ,
346350{
347351 type This < ' w > = Self ;
348-
352+ # [ profiling :: function ]
349353 fn from_script ( value : ScriptValue , world : WorldGuard ) -> Result < Self , InteropError > {
350354 match value {
351355 ScriptValue :: List ( list) => {
@@ -368,7 +372,7 @@ where
368372 for < ' w > T :: This < ' w > : Into < T > ,
369373{
370374 type This < ' w > = Self ;
371-
375+ # [ profiling :: function ]
372376 fn from_script ( value : ScriptValue , world : WorldGuard ) -> Result < Self , InteropError > {
373377 match value {
374378 ScriptValue :: List ( list) if list. len ( ) == N => {
@@ -390,7 +394,7 @@ where
390394
391395impl FromScript for DynamicScriptFunctionMut {
392396 type This < ' w > = Self ;
393-
397+ # [ profiling :: function ]
394398 fn from_script ( value : ScriptValue , _: WorldGuard < ' _ > ) -> Result < Self :: This < ' _ > , InteropError >
395399 where
396400 Self : Sized ,
@@ -407,7 +411,7 @@ impl FromScript for DynamicScriptFunctionMut {
407411
408412impl FromScript for DynamicScriptFunction {
409413 type This < ' w > = Self ;
410-
414+ # [ profiling :: function ]
411415 fn from_script ( value : ScriptValue , _: WorldGuard < ' _ > ) -> Result < Self :: This < ' _ > , InteropError >
412416 where
413417 Self : Sized ,
@@ -428,7 +432,7 @@ where
428432 for < ' w > V :: This < ' w > : Into < V > ,
429433{
430434 type This < ' w > = Self ;
431-
435+ # [ profiling :: function ]
432436 fn from_script ( value : ScriptValue , world : WorldGuard ) -> Result < Self , InteropError > {
433437 match value {
434438 ScriptValue :: Map ( map) => {
0 commit comments