Skip to content

Commit

Permalink
Fix clippy::semicolon_if_nothing_returned lints
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys committed Oct 7, 2024
1 parent d43f2a9 commit 73aa8df
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/internal/var.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ pub fn item_delta(
} else if coord == peak {
continue;
} else if coord < peak {
scalar = scalar * (coord - start) / (peak - start)
scalar = scalar * (coord - start) / (peak - start);
} else {
scalar = scalar * (end - coord) / (end - peak)
scalar = scalar * (end - coord) / (end - peak);
};
}
let val = if idx >= short_count {
Expand Down
2 changes: 1 addition & 1 deletion src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ impl<'a> GlyphMetrics<'a> {
pub fn lsb(&self, glyph_id: GlyphId) -> f32 {
let mut v = xmtx::sb(self.data, self.hmtx, self.hmtx_count, glyph_id) as f32;
if self.hvar != 0 {
v += var::sb_delta(self.data, self.hvar, glyph_id, self.coords)
v += var::sb_delta(self.data, self.hvar, glyph_id, self.coords);
}
v * self.scale
}
Expand Down
2 changes: 1 addition & 1 deletion src/scale/outline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ impl Outline {
points: (0, points_end),
verbs: (0, verbs_end),
color_index: None,
})
});
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/shape/at.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ impl FeatureStore {
let mut sub = self.groups.basic;
let mut pos = self.groups.position;
if dir == Direction::RightToLeft {
sub |= self.groups.rtl
sub |= self.groups.rtl;
}
for feature in features {
if let Ok(index) = self.features.binary_search_by(|x| x.0.cmp(&feature.0)) {
Expand Down
4 changes: 2 additions & 2 deletions src/shape/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ impl Buffer {
component: !0,
cluster,
data: ch.data,
})
});
}

fn _push_hangul_char(&mut self, ch: &Char) {
Expand All @@ -217,7 +217,7 @@ impl Buffer {
component: !0,
cluster,
data: ch.data,
})
});
}

fn push_cluster(&mut self, cluster: &CharCluster) {
Expand Down
2 changes: 1 addition & 1 deletion src/shape/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ impl<'a> Engine<'a> {
for (tag, value) in features {
if let Some((selector, [on, off])) = feature_from_tag(*tag) {
let setting = if *value == 0 { off } else { on };
selectors.push((selector, setting))
selectors.push((selector, setting));
}
}
selectors.sort_unstable();
Expand Down
4 changes: 2 additions & 2 deletions src/text/lang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl Language {
lang.lang_len = 2;
let key = tag2(&[a, b]);
if let Ok(index) = LANG_BY_TAG2.binary_search_by(|x| x.0.cmp(&key)) {
lang_index = LANG_BY_TAG2.get(index)?.1
lang_index = LANG_BY_TAG2.get(index)?.1;
}
}
3 => {
Expand All @@ -79,7 +79,7 @@ impl Language {
lang.lang_len = 3;
let key = tag3(&[a, b, c]);
if let Ok(index) = LANG_BY_TAG3.binary_search_by(|x| x.0.cmp(&key)) {
lang_index = LANG_BY_TAG3.get(index)?.1 as u16
lang_index = LANG_BY_TAG3.get(index)?.1 as u16;
}
}
_ => return None,
Expand Down

0 comments on commit 73aa8df

Please sign in to comment.