Avoid closures for the intermediate macro.

This commit is contained in:
Tom Alexander
2023-10-29 18:35:42 -04:00
parent 3d44d20384
commit 24b9782146
16 changed files with 40 additions and 51 deletions

View File

@@ -8,19 +8,15 @@ pub(crate) struct IFootnoteReference {
duplicate_offset: usize,
}
intermediate!(
IFootnoteReference,
FootnoteReference,
|registry, original| async {
let footnote_id = registry
.get_footnote_reference_id(original.label, &original.definition)
.await?;
Ok(IFootnoteReference {
footnote_id,
duplicate_offset: 0, // TODO
})
}
);
intermediate!(IFootnoteReference, FootnoteReference, original, registry, {
let footnote_id = registry
.get_footnote_reference_id(original.label, &original.definition)
.await?;
Ok(IFootnoteReference {
footnote_id,
duplicate_offset: 0, // TODO
})
});
impl IFootnoteReference {
pub(crate) fn get_display_label(&self) -> String {