Compare commits

...

2 commits

Author SHA1 Message Date
c2cfd3f72c Oops 2024-07-26 11:24:25 +02:00
c53e88bee8 Oops 2024-07-26 11:22:13 +02:00

View file

@ -7,7 +7,6 @@ use rusqlite::Connection;
use crate::document::document::Document;
use crate::document::document::ElemReference;
use crate::document::element::ReferenceableElement;
use crate::document::variable::Variable;
#[derive(Clone, Copy)]
@ -40,7 +39,7 @@ impl Compiler {
/// Inserts or get a reference id for the compiled document
///
/// # Parameters
/// # Parameters
/// - [`reference`] The reference to get or insert
pub fn reference_id<'a>(&self, document: &'a dyn Document, reference: ElemReference) -> usize {
let mut borrow = self.reference_count.borrow_mut();
@ -62,7 +61,7 @@ impl Compiler {
// Insert new ref
let index = map
.iter()
.fold(0, |max, (name, value)| std::cmp::max(max, *value));
.fold(0, |max, (_, value)| std::cmp::max(max, *value));
map.insert(refname.clone(), index + 1);
index + 1
}