Use ouroboros in FontSystem to avoid lifetime bound

Perhaps not quite what ouroboros is expected to be used for, but it's
not too bad, and avoiding the lifetime bound can be a huge help.
This commit is contained in:
Ian Douglas Scott 2022-11-02 19:25:18 -07:00 committed by Jeremy Soller
parent ac354c3a2a
commit 0d3fb1dd9d
8 changed files with 85 additions and 62 deletions

View file

@ -102,7 +102,7 @@ fn shape_fallback(
}
fn shape_run<'a>(
font_system: &'a FontSystem<'a>,
font_system: &'a FontSystem,
line: &str,
attrs_list: &AttrsList,
start_run: usize,
@ -281,7 +281,7 @@ pub struct ShapeWord {
impl ShapeWord {
pub fn new<'a>(
font_system: &'a FontSystem<'a>,
font_system: &'a FontSystem,
line: &str,
attrs_list: &AttrsList,
start_word: usize,
@ -344,7 +344,7 @@ pub struct ShapeSpan {
impl ShapeSpan {
pub fn new<'a>(
font_system: &'a FontSystem<'a>,
font_system: &'a FontSystem,
line: &str,
attrs_list: &AttrsList,
start_span: usize,
@ -424,7 +424,7 @@ pub struct ShapeLine {
impl ShapeLine {
pub fn new<'a>(
font_system: &'a FontSystem<'a>,
font_system: &'a FontSystem,
line: &str,
attrs_list: &AttrsList
) -> Self {