Implement Clone for Buffer and use Arc::make_mut

This commit is contained in:
Jeremy Soller 2023-12-19 15:58:45 -07:00
parent 0a11fb1045
commit 46d60a3723
4 changed files with 21 additions and 10 deletions

View file

@ -379,7 +379,7 @@ fn shape_skip(
}
/// A shaped glyph
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct ShapeGlyph {
pub start: usize,
pub end: usize,
@ -423,7 +423,7 @@ impl ShapeGlyph {
}
/// A shaped word (for word wrapping)
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct ShapeWord {
pub blank: bool,
pub glyphs: Vec<ShapeGlyph>,
@ -527,7 +527,7 @@ impl ShapeWord {
}
/// A shaped span (for bidirectional processing)
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct ShapeSpan {
pub level: unicode_bidi::Level,
pub words: Vec<ShapeWord>,
@ -638,7 +638,7 @@ impl ShapeSpan {
}
/// A shaped line (or paragraph)
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct ShapeLine {
pub rtl: bool,
pub spans: Vec<ShapeSpan>,