Josh Stone

Results 817 comments of Josh Stone

> Is there any particular reason the functions of `trait Euclid` takes their args by reference, instead of by value? In std `f32::rem_euclid` also takes them by value, not reference,...

> Could there be an option to implement `rem_euclid` (and maybe other std functions) in `Float` taking args by value, without that trait interface? I think that would introduce method...

Sorry I've neglected this -- I will try to review it soon!

New guarantees should be considered by @rust-lang/libs-api.

LGTM, and thanks for the detailed tables and graphs as well! @bors r+ rollup=never (just to be sure of independent perf)

I would prefer to wait for the `std` version to stabilize, so we can make sure to match its final API. https://github.com/rust-lang/rust/issues/60896 (I authored that initially, but anyone could chase...

It's worth mentioning that the version by value, `get_or_insert`, is trivial with `IndexSet::insert_full` and then `&set[i]`. I'm sure we'll add that method too when the time comes, but it won't...

Yeah, understood. Another potential workaround is to make the clone cheaper, like wrapping the expensive part in `Rc`/`Arc` so it can be shared, but that's not always feasible.

As a user, you can also add indirection like `Option` so it's only a pointer-sized `None` when empty. That's more of a hassle to actually use, of course, but you...

We do have `num-derive`, but not for generic types, as there are some open questions: https://github.com/rust-num/num-derive/pull/37