Skip to content

Commit 4e05d7d

Browse files
committed
Suppress clippy
1 parent 72f8f20 commit 4e05d7d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

common/src/float_ops.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ pub fn divmod(v1: f64, v2: f64) -> Option<(f64, f64)> {
211211
}
212212

213213
// nextafter algorithm based off of https://gitlab.com/bronsonbdevost/next_afterf
214+
#[allow(clippy::float_cmp)]
214215
pub fn nextafter(x: f64, y: f64) -> f64 {
215216
if x == y {
216217
y

vm/src/builtins/float.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,8 @@ impl IntoPyFloat {
547547

548548
pub fn vec_into_f64(v: Vec<Self>) -> Vec<f64> {
549549
// TODO: Vec::into_raw_parts once stabilized
550-
let mut m = std::mem::ManuallyDrop::new(v);
551-
let (p, l, c) = (m.as_mut_ptr(), m.len(), m.capacity());
550+
let mut v = std::mem::ManuallyDrop::new(v);
551+
let (p, l, c) = (v.as_mut_ptr(), v.len(), v.capacity());
552552
// SAFETY: IntoPyFloat is repr(transparent) over f64
553553
unsafe { Vec::from_raw_parts(p.cast(), l, c) }
554554
}

0 commit comments

Comments
 (0)