Skip to content

Commit 99a863a

Browse files
authored
Merge branch 'femtovg:master' into master
2 parents 9d5d607 + 59072a2 commit 99a863a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/text.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ impl TextContextImpl {
486486
}
487487

488488
pub fn measure_font(&mut self, font_size: f32, font_ids: &[Option<FontId>; 8]) -> Result<FontMetrics, ErrorKind> {
489-
if let Some(Some(id)) = font_ids.get(0) {
489+
if let Some(Some(id)) = font_ids.first() {
490490
if let Some(font) = self.font(*id) {
491491
return Ok(font.metrics(font_size));
492492
}
@@ -592,7 +592,7 @@ fn shape_run(
592592
// this controls whether we should break within words
593593
let mut first_word_in_paragraph = true;
594594

595-
if let Some(paragraph) = bidi_info.paragraphs.get(0) {
595+
if let Some(paragraph) = bidi_info.paragraphs.first() {
596596
let line = paragraph.range.clone();
597597

598598
let (levels, runs) = bidi_info.visual_runs(paragraph, line);
@@ -1253,7 +1253,7 @@ pub(crate) fn render_direct<T: Renderer>(
12531253
let scale = font.scale(font_size);
12541254

12551255
let glyph_rendering = if let Some(glyph_rendering) =
1256-
font.glyph_rendering_representation(&face, glyph.codepoint as u16, font_size as u16)
1256+
font.glyph_rendering_representation(face, glyph.codepoint as u16, font_size as u16)
12571257
{
12581258
glyph_rendering
12591259
} else {

0 commit comments

Comments
 (0)