From 24189f159a395b1b0fa167c20207b00877b1a088 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 4 Jan 2024 15:40:36 -0500 Subject: [PATCH] Fix clippy issue on Rust 1.75 With the recent release of Rust 1.75 there were some new clippy rules enabled. There was one minor usage issue highlighted in the new release. While we pin the rust version in CI when building and running clippy locally with the latest version this would trigger a failure. This commit fixes the one issue highlighted by clippy on Rust 1.75 which replaces `Vec.get(0)` with `Vec.first()`. --- crates/accelerate/src/results/marginalization.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/accelerate/src/results/marginalization.rs b/crates/accelerate/src/results/marginalization.rs index f71511f0e1b6..7a91305b6158 100644 --- a/crates/accelerate/src/results/marginalization.rs +++ b/crates/accelerate/src/results/marginalization.rs @@ -132,7 +132,7 @@ pub fn marginal_memory( parallel_threshold: usize, ) -> PyResult { let run_in_parallel = getenv_use_multiple_threads(); - let first_elem = memory.get(0); + let first_elem = memory.first(); if first_elem.is_none() { let res: Vec = Vec::new(); return Ok(res.to_object(py));