mirror of
https://github.com/typst/typst
synced 2025-05-13 20:46:23 +08:00
Fix memory size of TextElem
(#5674)
This commit is contained in:
parent
be6629c7cb
commit
9473aface1
@ -555,6 +555,7 @@ pub struct TextElem {
|
||||
/// #lorem(10)
|
||||
/// ```
|
||||
#[fold]
|
||||
#[ghost]
|
||||
pub costs: Costs,
|
||||
|
||||
/// Whether to apply kerning.
|
||||
@ -1431,3 +1432,13 @@ fn check_font_list(engine: &mut Engine, list: &Spanned<FontList>) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn test_text_elem_size() {
|
||||
assert_eq!(std::mem::size_of::<TextElem>(), std::mem::size_of::<EcoString>());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user