add some inline hints

This commit is contained in:
Evan Almloff committed 2023-08-31 16:42:33 -05:00
1 parent 3c01593703
commit bf90b7584e
1 file changed
+2
+2
View File
@@ -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,