Skip to content

Commit

Permalink
feat: fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
light4 committed Dec 1, 2020
1 parent d394052 commit 9e8a68d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ impl Config {
pub fn get_shadow_adder(&self) -> Result<ShadowAdder, Error> {
Ok(ShadowAdder::new()
.background(match &self.background_image {
Some(path) => Background::Image(image::open(path)?.to_rgba()),
Some(path) => Background::Image(image::open(path)?.to_rgba8()),
None => Background::Solid(self.background),
})
.shadow_color(self.shadow_color)
Expand Down
6 changes: 4 additions & 2 deletions src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,10 @@ impl ImageFont {
pub fn new(name: &str, size: f32) -> Result<Self, FontError> {
// Silicon already contains Hack font
if name == "Hack" {
let mut font = Self::default();
font.size = size;
let font = ImageFont {
size,
..Default::default()
};
return Ok(font);
}

Expand Down

0 comments on commit 9e8a68d

Please sign in to comment.