Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
jabuwu committed Sep 7, 2024
1 parent 86355c2 commit 5d15153
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions examples/miniquad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,8 @@ impl EventHandler for Stage {
format,
} => {
use image::io::Reader as ImageReader;

#[allow(clippy::needless_borrows_for_generic_args)]
let image = ImageReader::open(&path)
.unwrap_or_else(|_| panic!("failed to open image: {}", &path))
.decode()
Expand Down
11 changes: 5 additions & 6 deletions src/c_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -937,8 +937,7 @@ macro_rules! c_vertex_attachment_accessors {
stride: i32,
) {
crate::c::spVertexAttachment_computeWorldVertices(
self.vertex_attachment() as *const crate::c::spVertexAttachment
as *mut crate::c::spVertexAttachment,
(self.vertex_attachment() as *const crate::c::spVertexAttachment).cast_mut(),
slot.c_ptr(),
start,
count,
Expand Down Expand Up @@ -1004,8 +1003,8 @@ macro_rules! c_handle_decl {
#[must_use]
pub(crate) const fn new(c_item: *const $c_type, c_parent: *const $c_parent) -> Self {
Self {
c_item: SyncPtr(c_item as *mut $c_type),
c_parent: SyncPtr(c_parent as *mut $c_parent),
c_item: SyncPtr(c_item.cast_mut()),
c_parent: SyncPtr(c_parent.cast_mut()),
}
}

Expand Down Expand Up @@ -1070,8 +1069,8 @@ macro_rules! c_handle_indexed_decl {
) -> Self {
Self {
index,
c_item: SyncPtr(c_item as *mut $c_type),
c_parent: SyncPtr(c_parent as *mut $c_parent),
c_item: SyncPtr(c_item.cast_mut()),
c_parent: SyncPtr(c_parent.cast_mut()),
}
}

Expand Down

0 comments on commit 5d15153

Please sign in to comment.