Skip to content

Commit e9ccd3f

Browse files
authored
Use {integer}::div_ceil where appropriate (Qiskit#13716)
The method was added in Rust 1.73, which was previously above our MSRV. Recent clippy versions now warn against the workaround on complexity grounds, since our MSRV indicates we can use the built-in version.
1 parent ff57b23 commit e9ccd3f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/accelerate/src/sparse_pauli_op.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ macro_rules! impl_to_matrix_sparse {
11611161
// to keep threads busy by subdivision with minimizing overhead; we're setting the
11621162
// chunk size such that the iterator will have as many elements as there are threads.
11631163
let num_threads = rayon::current_num_threads();
1164-
let chunk_size = (side + num_threads - 1) / num_threads;
1164+
let chunk_size = side.div_ceil(num_threads);
11651165
let mut values_chunks = Vec::with_capacity(num_threads);
11661166
let mut indices_chunks = Vec::with_capacity(num_threads);
11671167
// SAFETY: the slice here is uninitialised data; it must not be read.

0 commit comments

Comments
 (0)