Skip to content

Commit

Permalink
fix clippy warnings from 1.76 (#120)
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Fenoll <[email protected]>
  • Loading branch information
fenollp authored Mar 4, 2024
1 parent 3c0e73b commit 12e1d66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ fn on_wacom_input(app: &mut appctx::ApplicationContext<'_>, input: input::WacomE
let framebuffer = app.get_framebuffer_ref();
let points = [
wacom_stack.pop_front().unwrap(),
*wacom_stack.get(0).unwrap(),
*wacom_stack.front().unwrap(),
*wacom_stack.get(1).unwrap(),
];
let radii: Vec<f32> = points
Expand Down
14 changes: 7 additions & 7 deletions examples/live.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ fn main() {
continue;
}

let width = DISPLAYWIDTH as u32;
let height = DISPLAYHEIGHT as u32;
let width = u32::from(DISPLAYWIDTH);
let height = u32::from(DISPLAYHEIGHT);
let contents = fb
.dump_region(framebuffer::common::mxcfb_rect {
top: 0,
Expand All @@ -51,15 +51,15 @@ fn main() {

let url_lc = request.url().to_lowercase();
let (data, mime) = if url_lc.ends_with("jpg") || url_lc.ends_with("jpeg") {
(encode(&*&rgb888, ImageFormat::Jpeg), "image/jpeg")
(encode(&rgb888, ImageFormat::Jpeg), "image/jpeg")
} else if url_lc.ends_with("gif") {
(encode(&*&rgb888, ImageFormat::Gif), "image/gif")
(encode(&rgb888, ImageFormat::Gif), "image/gif")
} else if url_lc.ends_with("bmp") {
(encode(&*&rgb888, ImageFormat::Bmp), "image/bmp")
(encode(&rgb888, ImageFormat::Bmp), "image/bmp")
} else if url_lc.ends_with("tga") {
(encode(&*&rgb888, ImageFormat::Tga), "image/x-tga")
(encode(&rgb888, ImageFormat::Tga), "image/x-tga")
} else {
(encode(&*&rgb888, ImageFormat::Png), "image/png")
(encode(&rgb888, ImageFormat::Png), "image/png")
};
let response = Response::new_empty(StatusCode(200))
.with_data(&*data, Some(data.len()))
Expand Down

0 comments on commit 12e1d66

Please sign in to comment.