aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/text/text_run.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-09-04 10:51:24 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-09-04 18:30:46 +0530
commit8e2c37a542e6bb96681e78977aedaaf675236922 (patch)
treec17f68a4c3eaf7e58c1355325a48ea2e78139ecb /components/gfx/text/text_run.rs
parent5c24da3e2d01b5c583d8def9936a5355b3c27f87 (diff)
downloadservo-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.rs5
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)