Josh Stone

Results 817 comments of Josh Stone

> I believe it happens because `Either::as_ref` method effectively hides the `AsRef::as_ref` method :( Yes, inherent methods take priority over trait methods. > Shouldn't it be renamed to something like...

> As you've mentioned `Either` is more of a chimera than a direct analogue of either `Iterator` or `Option` or `Result` or whatever, so I believe an interface should not...

I don't know that 2.0 is "probable" any time soon, but I just added a "potential-2.0" label, at least. :)

`Borrow` might work for you, except `Either` doesn't implement that, and I think it would be a breaking change to add that as a new blanket impl. Besides, you might...

> 1\. Can a denominator of `0` exclusively be yielded when the input `f64` is positive/negative infinity? No, this should be `None` -- it's meant to be an invariant of...

> In other words: Would it be correct to change the sentence to (`None` returned if...): > > > * `value` is positive or negative infinity, so the inner conversion...

By inspection, I'm not sure what cases reach that denominator of 0. I think that may just be defensive coding, but it could be interesting to put a panic in...

> (`println!()` seems to round for humans, because input values causing `d1.is_zero()` in your code were all printed with trailing zeroes. But the values are on either side of the...

> The inline comment implies that, at the time of implementing `Ord`, a `CheckedMul` trait was not available - however now it is! https://docs.rs/num-traits/0.2.16/num_traits/ops/checked/trait.CheckedMul.html. > > The problem is, adding...

It would be a problem if folks could write their own `From for (Local, Local)`, but neither `Ratio` nor `(Local, Local)` are considered local to the crate defining `Local`. So...