diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2015-09-04 10:51:24 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-09-04 18:30:46 +0530 |
commit | 8e2c37a542e6bb96681e78977aedaaf675236922 (patch) | |
tree | c17f68a4c3eaf7e58c1355325a48ea2e78139ecb /components/gfx/text/text_run.rs | |
parent | 5c24da3e2d01b5c583d8def9936a5355b3c27f87 (diff) | |
download | servo-8e2c37a542e6bb96681e78977aedaaf675236922.tar.gz servo-8e2c37a542e6bb96681e78977aedaaf675236922.zip |
Fix match_refs and let_returns in layout, address review changes
Diffstat (limited to 'components/gfx/text/text_run.rs')
-rw-r--r-- | components/gfx/text/text_run.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/gfx/text/text_run.rs b/components/gfx/text/text_run.rs index 22dfa37533b..ec1fc7e2744 100644 --- a/components/gfx/text/text_run.rs +++ b/components/gfx/text/text_run.rs @@ -156,15 +156,14 @@ impl<'a> Iterator for CharacterSliceIterator<'a> { impl<'a> TextRun { pub fn new(font: &mut Font, text: String, options: &ShapingOptions, bidi_level: u8) -> TextRun { let glyphs = TextRun::break_and_shape(font, &text, options); - let run = TextRun { + TextRun { text: Arc::new(text), font_metrics: font.metrics.clone(), font_template: font.handle.template(), actual_pt_size: font.actual_pt_size, glyphs: Arc::new(glyphs), bidi_level: bidi_level, - }; - run + } } pub fn break_and_shape(font: &mut Font, text: &str, options: &ShapingOptions) |