Fix warnings

This commit is contained in:
diquah 2025-04-10 19:18:21 -07:00
parent 7d6d46c4d8
commit 4fa7e5cfd9

View File

@ -17,7 +17,7 @@ use typst_library::foundations::{Packed, Resolve, Smart, StyleChain};
use typst_library::introspection::{Introspector, Locator, LocatorLink, SplitLocator}; use typst_library::introspection::{Introspector, Locator, LocatorLink, SplitLocator};
use typst_library::layout::{Abs, AlignElem, Dir, FixedAlignment, Fragment, Size}; use typst_library::layout::{Abs, AlignElem, Dir, FixedAlignment, Fragment, Size};
use typst_library::model::{ use typst_library::model::{
EnumElem, FirstLineIndent, Linebreaks, ListElem, Microtype, ParElem, ParLine, EnumElem, FirstLineIndent, Linebreaks, ListElem, ParElem, ParLine,
ParLineMarker, TermsElem, ParLineMarker, TermsElem,
}; };
use typst_library::routines::{Arenas, Pair, RealizationKind, Routines}; use typst_library::routines::{Arenas, Pair, RealizationKind, Routines};
@ -183,13 +183,11 @@ fn configuration(
situation: Option<ParSituation>, situation: Option<ParSituation>,
) -> Config { ) -> Config {
let justify = base.justify; let justify = base.justify;
let microtype = ParElem::microtype_in(shared);
let font_size = TextElem::size_in(shared); let font_size = TextElem::size_in(shared);
let dir = TextElem::dir_in(shared); let dir = TextElem::dir_in(shared);
Config { Config {
justify, justify,
microtype,
linebreaks: base.linebreaks.unwrap_or_else(|| { linebreaks: base.linebreaks.unwrap_or_else(|| {
if justify { if justify {
Linebreaks::Optimized Linebreaks::Optimized
@ -269,8 +267,6 @@ struct ConfigBase {
struct Config { struct Config {
/// Whether to justify text. /// Whether to justify text.
justify: bool, justify: bool,
/// The maximum allowed kerning adjustment for microjustification.
microtype: Microtype,
/// How to determine line breaks. /// How to determine line breaks.
linebreaks: Linebreaks, linebreaks: Linebreaks,
/// The indent the first line of a paragraph should have. /// The indent the first line of a paragraph should have.