Skip to content

Commit

Permalink
Fix clippy issue on Rust 1.75
Browse files Browse the repository at this point in the history
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<T>.get(0)` with `Vec<T>.first()`.
  • Loading branch information
mtreinish committed Jan 4, 2024
1 parent c399df2 commit 24189f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/accelerate/src/results/marginalization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ pub fn marginal_memory(
parallel_threshold: usize,
) -> PyResult<PyObject> {
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<String> = Vec::new();
return Ok(res.to_object(py));
Expand Down

0 comments on commit 24189f1

Please sign in to comment.