Skip to content

Commit 24ce6bf

Browse files
committed
fix warnings with newer rustc version
1 parent afb1a89 commit 24ce6bf

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

quicksilver/src/reflections.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub unsafe fn reflect_struct(base: *mut u8, mirror: &Struct) -> StructReflection
7676
}
7777
}
7878

79-
pub unsafe fn reflect_value(ptr: *mut u8, ty: &Type) -> ValueReflection {
79+
pub unsafe fn reflect_value(ptr: *mut u8, ty: &Type) -> ValueReflection<'_> {
8080
match ty {
8181
Type::I32 => {
8282
let value = unsafe { &mut *(ptr as *mut i32) };

quicksilver/src/reflections_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub unsafe fn reflect_struct_ref(base: *const u8, mirror: &Struct) -> StructRefl
2828
}
2929
}
3030

31-
pub unsafe fn reflect_value_ref(ptr: *const u8, ty: &Type) -> ValueReflection {
31+
pub unsafe fn reflect_value_ref(ptr: *const u8, ty: &Type) -> ValueReflection<'_> {
3232
match ty {
3333
Type::I32 => {
3434
let value = unsafe { &*(ptr as *const i32) };

quicksilver/src/vec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ impl VecReflection<'_> {
109109
unsafe { (self.vtable.get_len)(self.ptr) }
110110
}
111111

112-
pub fn get(&mut self, index: usize) -> ValueReflection {
112+
pub fn get(&mut self, index: usize) -> ValueReflection<'_> {
113113
unsafe {
114114
let ptr = (self.vtable.get_elem)(self.ptr, index);
115115
reflect_value(ptr, &self.element)
116116
}
117117
}
118118

119-
pub fn get_ref(&self, index: usize) -> ValueReflection {
119+
pub fn get_ref(&self, index: usize) -> ValueReflection<'_> {
120120
unsafe {
121121
let ptr = (self.vtable.get_elem_ref)(self.ptr, index);
122122
reflect_value_ref(ptr, &self.element)

quicksilver/tests/it/basic.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ struct MyData {
1818
}
1919

2020
#[derive(Debug, Quicksilver)]
21+
#[expect(unused)]
2122
pub struct Player {
2223
pub pulse: f32,
2324
pub last_action: i32,

quicksilver/tests/it/containers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ struct VecHolder {
1818
}
1919

2020
#[derive(Debug, PartialEq, Quicksilver)]
21+
#[expect(unused)]
2122
struct TuplePoint2f(f32, f32);
2223

2324
#[test]

0 commit comments

Comments
 (0)