Skip to main content

fit_and_compose

Function fit_and_compose 

Source
fn fit_and_compose(
    entries: Vec<Entry>,
    summary: Option<&str>,
    reason: Reason,
    carry: StartupCarry,
    tool_only: bool,
    modified_ms: &dyn Fn(&Entry) -> Option<i64>,
    now_ms: i64,
) -> Option<(Fitted, Composed, Vec<String>, usize)>
Expand description

The delivery’s entries sorted by what each gets (fit::fit), composed and split the way the hooks will carry them. The character budget is only a guess at how the parts break at line ends, so when the real split still cuts (the notes at the end are what can tip it), a little more room is kept back and the fit is redone, so the reserved summary and the notes are never the part that is lost.