diff --git a/src/components/gfx/text/text_run.rs b/src/components/gfx/text/text_run.rs index 0316dd37bb7..fe623dc1f64 100644 --- a/src/components/gfx/text/text_run.rs +++ b/src/components/gfx/text/text_run.rs @@ -18,7 +18,7 @@ pub struct TextRun { pub font_metrics: FontMetrics, pub font_style: FontStyle, pub decoration: text_decoration::T, - pub glyphs: Arc<~[Arc]>, + pub glyphs: Arc>>, } pub struct SliceIterator<'a> { @@ -113,10 +113,10 @@ impl<'a> TextRun { pub fn teardown(&self) { } - pub fn break_and_shape(font: &mut Font, text: &str) -> ~[Arc] { + pub fn break_and_shape(font: &mut Font, text: &str) -> Vec> { // TODO(Issue #230): do a better job. See Gecko's LineBreaker. - let mut glyphs = ~[]; + let mut glyphs = Vec::new(); let mut byte_i = 0u; let mut cur_slice_is_whitespace = false; let mut byte_last_boundary = 0; @@ -174,7 +174,7 @@ impl<'a> TextRun { }) } - pub fn glyphs(&'a self) -> &'a ~[Arc] { + pub fn glyphs(&'a self) -> &'a Vec> { &*self.glyphs }