mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
Janitor: Fix clippy::useless_conversion
This commit is contained in:
parent
60575e7878
commit
09e272abb6
2 changed files with 5 additions and 6 deletions
|
@ -26,7 +26,7 @@ pub fn use_modules() -> usize {
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn sixtyfps_windowrc_init(out: *mut WindowRcOpaque) {
|
pub unsafe extern "C" fn sixtyfps_windowrc_init(out: *mut WindowRcOpaque) {
|
||||||
assert_eq!(core::mem::size_of::<WindowRc>(), core::mem::size_of::<WindowRcOpaque>());
|
assert_eq!(core::mem::size_of::<WindowRc>(), core::mem::size_of::<WindowRcOpaque>());
|
||||||
core::ptr::write(out as *mut WindowRc, crate::backend().create_window().into());
|
core::ptr::write(out as *mut WindowRc, crate::backend().create_window());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
|
|
@ -99,14 +99,13 @@ pub fn main() {
|
||||||
image::open(&cat_path).expect("Error loading cat image").into_rgba8()
|
image::open(&cat_path).expect("Error loading cat image").into_rgba8()
|
||||||
};
|
};
|
||||||
|
|
||||||
main_window.set_original_image(
|
main_window.set_original_image(sixtyfps::Image::from_rgba8(
|
||||||
sixtyfps::Image::from_rgba8(sixtyfps::SharedPixelBuffer::clone_from_slice(
|
sixtyfps::SharedPixelBuffer::clone_from_slice(
|
||||||
source_image.as_raw(),
|
source_image.as_raw(),
|
||||||
source_image.width() as _,
|
source_image.width() as _,
|
||||||
source_image.height() as _,
|
source_image.height() as _,
|
||||||
))
|
),
|
||||||
.into(),
|
));
|
||||||
);
|
|
||||||
|
|
||||||
let filters = Filters(vec![
|
let filters = Filters(vec![
|
||||||
Filter {
|
Filter {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue