Compare commits
2 commits
55c65fe30e
...
c2cfd3f72c
Author | SHA1 | Date | |
---|---|---|---|
c2cfd3f72c | |||
c53e88bee8 |
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue