]> git.nega.tv - josh/narcissus/commitdiff
misc: Fix clippy lints
authorJoshua Simmons <josh@nega.tv>
Sun, 5 May 2024 14:47:44 +0000 (16:47 +0200)
committerJoshua Simmons <josh@nega.tv>
Sun, 5 May 2024 14:47:44 +0000 (16:47 +0200)
engine/narcissus-maths/tests/exhaustive_f32.rs
engine/narcissus-sqlite/src/lib.rs
title/shark/src/main.rs

index 385b0dbec69074f4200925bf70bce4a42a782a02..e3c102bf0cc1db35f5bf2d455ff02ff70e77cecf 100644 (file)
@@ -456,7 +456,7 @@ pub fn exhaustive_tan_pi() {
 #[test]
 #[ignore]
 pub fn exhaustive_exp() {
-    let errors = check_exhaustive_f32(ref_exp_f32, |a| exp_f32(a), false);
+    let errors = check_exhaustive_f32(ref_exp_f32, exp_f32, false);
     println!("EXP: {errors:?}");
     assert_eq!(errors.max_error_ulp, 1);
 }
index 90cd3cd59ce9f255a4f82e6de2f480e36580f7df..e28a824149cd5c0d9df7937e026230352b6a1203 100644 (file)
@@ -489,7 +489,7 @@ mod tests {
         for (name, age) in names_to_ages {
             statement
                 .query()
-                .bind_text(name_index, &name)
+                .bind_text(name_index, name)
                 .bind_i32(age_index, age)
                 .execute()
                 .unwrap();
index e0f133aa014e9c5d45664842b0d3c8de2b3440c6..c066bb250708b650fefbb1654269ae1716cd7041 100644 (file)
@@ -377,7 +377,7 @@ impl GameState {
         self.archetype_projectile[i / 8].velocity_x[i % 8] = velocity.x;
         self.archetype_projectile[i / 8].velocity_z[i % 8] = velocity.z;
         self.archetype_projectile[i / 8].lifetime[i % 8] = lifetime;
-        self.archetype_projectile_bitmap_1[i / 64] |= 1 << i % 64;
+        self.archetype_projectile_bitmap_1[i / 64] |= 1 << (i % 64);
         self.archetype_projectile_bitmap_0[i / 64 / 64] |= 1 << ((i / 64) % 64);
     }
 }
@@ -472,12 +472,12 @@ pub fn main() {
 
         let blåhaj_buffer = device.request_transient_buffer_with_data(
             &frame,
-            &thread_token,
+            thread_token,
             BufferUsageFlags::TRANSFER,
             blåhaj_image_data.as_slice(),
         );
 
-        let mut cmd_encoder = device.request_cmd_encoder(&frame, &thread_token);
+        let mut cmd_encoder = device.request_cmd_encoder(&frame, thread_token);
         {
             let cmd_encoder = &mut cmd_encoder;
 
@@ -558,7 +558,7 @@ pub fn main() {
             let (width, height, swapchain_image) = loop {
                 let (width, height) = main_window.extent();
                 if let Ok(result) = device.acquire_swapchain(
-                    &frame,
+                    frame,
                     main_window.upcast(),
                     width,
                     height,
@@ -682,12 +682,12 @@ pub fn main() {
             );
             let clip_from_model = clip_from_camera * camera_from_model;
 
-            let mut cmd_encoder = device.request_cmd_encoder(&frame, &thread_token);
+            let mut cmd_encoder = device.request_cmd_encoder(frame, thread_token);
             {
                 let cmd_encoder = &mut cmd_encoder;
 
                 if width != depth_width || height != depth_height {
-                    device.destroy_image(&frame, depth_image);
+                    device.destroy_image(frame, depth_image);
                     depth_image = device.create_image(&ImageDesc {
                         memory_location: MemoryLocation::Device,
                         host_mapped: false,
@@ -1009,7 +1009,7 @@ pub fn main() {
 
                 device.cmd_end_rendering(cmd_encoder);
             }
-            device.submit(&frame, cmd_encoder);
+            device.submit(frame, cmd_encoder);
         }
         device.end_frame(frame);
     }