Skip to content

direct-0.1.0 beta regression #43665

Closed
Closed

Description

@est31

direct version 0.1.0 regressed from stable to beta (full log):

 error: use of unstable library feature 'ord_max_min' (see issue #25663)
    --> src/lib.rs:308:54
     |
 308 |                     (ordered_float::NotNaN::new(left.min(right.into_inner())).unwrap(), idx)
     |                                                      ^^^
 
 error[E0308]: mismatched types
    --> src/lib.rs:308:58
     |
 308 |                     (ordered_float::NotNaN::new(left.min(right.into_inner())).unwrap(), idx)
     |                                                          ^^^^^^^^^^^^^^^^^^ expected struct `ordered_float::NotNaN`, found f64
     |
     = note: expected type `ordered_float::NotNaN<f64>`
                found type `f64`

cc @Blei

Activity

  1. arielb1 commented on Aug 5, 2017

    @arielb1
    Contributor

    The new Ord::min shadows f64's min, which was accessed through the Deref impl at https://github.com/reem/rust-ordered-float/blob/b27bbd4/src/lib.rs#L225.

    The new impl is actually more of what you want - it would allow the code to be simplified to left.min(right). Unfortunately, that won't work on stable. But you can still use cmp::min(left, right) instead of that complicated line (after a use std::cmp;).

  2. Blei commented on Aug 7, 2017

    @Blei
    Contributor

    Thank you! Fixed and published a new version.

  3. est31 commented on Aug 7, 2017

    @est31
    MemberAuthor

    Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-api[DEPRECATED; DO NOT USE]regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions