From c0c74d7f2d431d727f07bf46284999ade1317a29 Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Thu, 1 Feb 2024 01:08:59 +0100 Subject: [PATCH] remove tinyvec since we already have smallvec --- Cargo.lock | 1 - Cargo.toml | 1 - src/backend/input.rs | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0527c91..1606684 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4209,7 +4209,6 @@ dependencies = [ "smallvec", "strum", "thiserror", - "tinyvec", "vulkano", "vulkano-shaders", "winit", diff --git a/Cargo.toml b/Cargo.toml index 581d08c..681dd12 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,7 +38,6 @@ serde_yaml = "0.9.25" smallvec = "1.11.0" strum = { version = "0.25.0", features = ["derive"] } thiserror = "1.0.56" -tinyvec = "1.6.0" vulkano = { git = "https://github.com/vulkano-rs/vulkano", rev = "94f50f1" } vulkano-shaders = { git = "https://github.com/vulkano-rs/vulkano", rev = "94f50f1" } winit = "0.29.10" diff --git a/src/backend/input.rs b/src/backend/input.rs index a1dc542..0e4d61a 100644 --- a/src/backend/input.rs +++ b/src/backend/input.rs @@ -1,10 +1,10 @@ use std::{collections::VecDeque, time::Instant}; use glam::{Affine3A, Vec2, Vec3A}; -use tinyvec::array_vec; #[cfg(feature = "openvr")] use ovr_overlay::TrackedDeviceIndex; +use smallvec::{smallvec, SmallVec}; use crate::state::AppState; @@ -341,7 +341,7 @@ impl Pointer { where O: Default, { - let mut hits = array_vec!([RayHit; 8]); + let mut hits: SmallVec<[RayHit; 8]> = smallvec!(); for overlay in overlays.iter() { if !overlay.state.want_visible { @@ -352,7 +352,7 @@ impl Pointer { if hit.dist.is_infinite() || hit.dist.is_nan() { continue; } - hits.try_push(hit); + hits.push(hit); } }