Skip to content

Commit

Permalink
chore: more clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
galister committed Mar 23, 2024
1 parent e70aaa0 commit 7ab0360
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/gui/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ impl FontCache {

let pattern = pattern.font_match(&mut self.fc);

for path in pattern.filename().iter() {
if let Some(path) = pattern.filename() {
log::debug!(
"Loading font: {} {}pt",
pattern.name().unwrap_or(path),
Expand All @@ -126,14 +126,16 @@ impl FontCache {
Ok(face) => face,
Err(e) => {
log::warn!("Failed to load font at {}: {:?}", path, e);
break;
coll.cp_map.insert(cp, 0);
return 0;
}
};
match face.set_char_size(size << 6, size << 6, 96, 96) {
Ok(_) => {}
Err(e) => {
log::warn!("Failed to set font size: {:?}", e);
break;
coll.cp_map.insert(cp, 0);
return 0;
}
};

Expand Down

0 comments on commit 7ab0360

Please sign in to comment.