Add intermediate lifetime.

This commit is contained in:
Tom Alexander
2023-10-29 12:15:07 -04:00
parent 52ca300de3
commit cb7c28c1ae
59 changed files with 140 additions and 140 deletions

View File

@@ -7,11 +7,11 @@ type IdCounter = u16;
pub(crate) struct Registry<'intermediate, 'parse> {
id_counter: IdCounter,
targets: HashMap<&'parse str, String>,
footnote_ids: Vec<(Option<&'parse str>, &Vec<Object<'parse>>)>,
footnote_ids: Vec<(Option<&'parse str>, &'intermediate Vec<Object<'parse>>)>,
}
impl<'parse> Registry<'parse> {
pub(crate) fn new() -> Registry<'parse> {
impl<'intermediate, 'parse> Registry<'intermediate, 'parse> {
pub(crate) fn new() -> Registry<'intermediate, 'parse> {
Registry {
id_counter: 0,
targets: HashMap::new(),
@@ -32,7 +32,7 @@ impl<'parse> Registry<'parse> {
pub(crate) fn get_footnote_reference_id<'b>(
&'b mut self,
label: Option<&'parse str>,
definition: &'parse Vec<Object<'parse>>,
definition: &'intermediate Vec<Object<'parse>>,
) -> usize {
if let None = label {
// If it has no label then it must always get a new ID.