Skip to content

fix(index): drop deprecated std::f32 import in vector tests - #558

Closed
ajianaz wants to merge 1 commit into
developfrom
fix/557-f32-epsilon-deprecated
Closed

ajianaz wants to merge 1 commit into
developfrom
fix/557-f32-epsilon-deprecated

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator

What

Remove the use std::f32; import from the src/index/vector.rs tests module so bare f32::EPSILON resolves to the associated constant instead of the deprecated module-path constant.

Why

On rustc 1.99 cargo clippy --all-targets -- -D warnings fails with 4 deprecated constant std::f32::EPSILON errors, which blocks every pre-commit commit on current-stable machines (the repo hook runs clippy). CI still passes only because its floating rust-toolchain@stable lags behind. One-line, zero-behavior-change unblock; details in #557.

Testing

  • cargo test --bin cora index::vector → 14 passed, 0 failed
  • cargo clippy --all-targets -- -D warnings → clean (previously 4 errors)
  • cargo fmt --all -- --check → clean

'use std::f32;' (tests module) makes bare f32::EPSILON resolve to the
deprecated module-path constant: hard clippy error on rustc 1.99
(-D warnings), blocking every pre-commit commit on current-stable
machines while CI's floating stable toolchain still passes. Removing
the import lets f32::EPSILON resolve to the associated constant
(stable since 1.43) on old and new toolchains alike.

Fixes #557
@ajianaz

ajianaz commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

Closing as redundant: the identical one-line fix (drop use std::f32; in vector tests) is included in #561, which additionally fixes the RUSTSEC-2026-0285 audit failure that is red on every open PR right now. #561 is fully green (14/14 incl. Clippy + Security Audit); merging it first makes this branch a strict duplicate of develop.

CI evidence for the contained change: #561 Clippy pass 2m50s on rustc stable (previously 4 errors on exactly these lines).

@ajianaz ajianaz closed this Oct 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant