Skip to content

WIP: fix use of deprecated constants std::f32::{ INFINITY, NEG_INFINITY } - #68

Closed
nwagner84 wants to merge 1 commit into
NatLibFi:mainfrom
nwagner84:fix-deprecated-const
Closed

nwagner84 wants to merge 1 commit into
NatLibFi:mainfrom
nwagner84:fix-deprecated-const

Conversation

@nwagner84

@nwagner84 nwagner84 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR fixes the following compiler warning (rust-version rustc 1.101.0-nightly):

$ cargo build --workspace --all-features
warning: use of deprecated constant `std::f32::INFINITY`: replaced by the `INFINITY` associated constant on `f32`
 --> src/model/liblinear.rs:7:16
  |
7 | use std::f32::{INFINITY, NEG_INFINITY};
  |                ^^^^^^^^
  |
  = note: `#[warn(deprecated)]` on by default

warning: use of deprecated constant `std::f32::NEG_INFINITY`: replaced by the `NEG_INFINITY` associated constant on `f32`
 --> src/model/liblinear.rs:7:26
  |
7 | use std::f32::{INFINITY, NEG_INFINITY};
  |                          ^^^^^^^^^^^^

warning: use of deprecated constant `std::f32::INFINITY`: replaced by the `INFINITY` associated constant on `f32`
   --> src/model/liblinear.rs:194:25
    |
194 |     let mut pgmax_old = INFINITY;
    |                         ^^^^^^^^

warning: use of deprecated constant `std::f32::NEG_INFINITY`: replaced by the `NEG_INFINITY` associated constant on `f32`
   --> src/model/liblinear.rs:214:21
    |
214 |         pgmax_new = NEG_INFINITY;
    |                     ^^^^^^^^^^^^

warning: use of deprecated constant `std::f32::INFINITY`: replaced by the `INFINITY` associated constant on `f32`
   --> src/model/liblinear.rs:215:21
    |
215 |         pgmin_new = INFINITY;
    |                     ^^^^^^^^

warning: use of deprecated constant `std::f32::INFINITY`: replaced by the `INFINITY` associated constant on `f32`
   --> src/model/liblinear.rs:268:29
    |
268 |                 pgmax_old = INFINITY;
    |                             ^^^^^^^^
warning: use of deprecated constant `std::f32::INFINITY`: replaced by the `INFINITY` associated constant on `f32`
 --> src/model/liblinear.rs:7:16
  |
7 | use std::f32::{INFINITY, NEG_INFINITY};
  |                ^^^^^^^^
  |
  = note: `#[warn(deprecated)]` on by default

warning: use of deprecated constant `std::f32::NEG_INFINITY`: replaced by the `NEG_INFINITY` associated constant on `f32`
 --> src/model/liblinear.rs:7:26
  |
7 | use std::f32::{INFINITY, NEG_INFINITY};
  |                          ^^^^^^^^^^^^

warning: use of deprecated constant `std::f32::INFINITY`: replaced by the `INFINITY` associated constant on `f32`
   --> src/model/liblinear.rs:194:25
    |
194 |     let mut pgmax_old = INFINITY;
    |                         ^^^^^^^^

warning: use of deprecated constant `std::f32::NEG_INFINITY`: replaced by the `NEG_INFINITY` associated constant on `f32`
   --> src/model/liblinear.rs:214:21
    |
214 |         pgmax_new = NEG_INFINITY;
    |                     ^^^^^^^^^^^^

warning: use of deprecated constant `std::f32::INFINITY`: replaced by the `INFINITY` associated constant on `f32`
   --> src/model/liblinear.rs:215:21
    |
215 |         pgmin_new = INFINITY;
    |                     ^^^^^^^^

warning: use of deprecated constant `std::f32::INFINITY`: replaced by the `INFINITY` associated constant on `f32`
   --> src/model/liblinear.rs:268:29
    |
268 |                 pgmax_old = INFINITY;
    |                             ^^^^^^^^

TODO

Signed-off-by: Nico Wagner <n.wagner@dnb.de>
@nwagner84

Copy link
Copy Markdown
Contributor Author

This PR is no longer necessary, since #69 already fixed the use of deprecated constants.

@nwagner84 nwagner84 closed this Oct 12, 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