Răsfoiți Sursa

add some inline hints

Evan Almloff 1 an în urmă
părinte
comite
bf90b7584e
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      packages/html/src/events.rs

+ 2 - 0
packages/html/src/events.rs

@@ -28,10 +28,12 @@ macro_rules! impl_event {
 
 static EVENT_CONVERTER: RwLock<Option<Box<dyn HtmlEventConverter>>> = RwLock::new(None);
 
+#[inline]
 pub fn set_event_converter(converter: Box<dyn HtmlEventConverter>) {
     *EVENT_CONVERTER.write().unwrap() = Some(converter);
 }
 
+#[inline]
 pub(crate) fn with_event_converter<F, R>(f: F) -> R
 where
     F: FnOnce(&dyn HtmlEventConverter) -> R,