avoid alloc

[?]
Jul 3, 2025, 2:18 PM
XZ6D3UUEHORAFR6E6NTIJAYEMNUREWPFHCR2FU7FRTHGGLUHZNVQC

Dependencies

  • [2] 23SFYK4Q big view refactor into a new crate
  • [3] WW36JYLR add iced_nav_scrollable widget crate
  • [4] WIFVLV37 nav-scrollabe: detect size to determine if needs scrolling, msg when ready
  • [5] SASAN2XC use nav-scrollable
  • [6] MYGIBRRH wip custom theme

Change contents

  • edit in inflorescence_view/src/diff.rs at line 97
    [5.691]
    [5.691]
    let children_len = sections_view.len();
  • edit in inflorescence_view/src/diff.rs at line 103
    [5.834]
    [5.834]
    children_len,
  • replacement in inflorescence_view/src/diff.rs at line 132
    [2.6088][5.1110:1303]()
    // TODO: only collecting to get `ExactSizeIterator` for `iced_nav_scrollable::view`, but the size can be determined from lengths of the two vecs
    let diffs: Vec<_> = diffs_with_contents
    [2.6088]
    [2.6124]
    let diffs = diffs_with_contents
  • replacement in inflorescence_view/src/diff.rs at line 139
    [2.6303][5.1304:1334]()
    )
    .collect();
    [2.6303]
    [2.6314]
    );
    let diffs_len = diffs_with_contents.len() + diffs_without_contents.len();
  • replacement in inflorescence_view/src/diff.rs at line 147
    [5.1515][5.1515:1550]()
    diffs.into_iter(),
    [5.1515]
    [5.1550]
    diffs,
    diffs_len,
  • replacement in iced_nav_scrollable/src/lib.rs at line 215
    [3.3617][3.3617:3724]()
    children: impl IntoIterator<Item = Element<'a, Message, Theme, Renderer>>
    + ExactSizeIterator,
    [3.3617]
    [4.4296]
    children: impl IntoIterator<Item = Element<'a, Message, Theme, Renderer>>,
    children_len: usize,
  • replacement in iced_nav_scrollable/src/lib.rs at line 225
    [3.3943][4.4354:4636]()
    debug_assert_eq!(nav.section_heights.len(), children.len(), "The `NavScrollable` was most likely initialized with a count different from the number of actual children given to the the view function. Count is {}, but got {} children", nav.section_heights.len(), children.len());
    [3.3943]
    [3.4211]
    debug_assert_eq!(nav.section_heights.len(), children_len, "The `NavScrollable` was most likely initialized with a count different from the number of actual children given to the the view function. Count is {}, but got {} children", nav.section_heights.len(), children_len);