llogiq
llogiq
cc @Amanieu
Thanks @Amanieu. Do you have an opinion on the open question? Should we have `into_mut_slice` instead of `into_slice` on `Option` to avoid inference failures on code like `foo.into_slice()` where `foo`'s...
I agree there's no perf benefit to having them, and `.map_or(&[], slice::from_ref())` (or `from_mut`, respectively) isn't too bad. Adding some verbiage to the documentation to steer people towards that solution...
I could write a lint for the various `as_slice`/`into_slice` patterns and run lintcheck on various crates to see whether there are more cases in the wild.
In the meantime I tried github code search to find a few more motivating examples. Here's what I found in a few minutes of searching: |repo|file|line|replace with| |----|----|----|----| |maekawatoshiki/sericum|src/ir/opcode.rs|373|as_slice |maekawatoshiki/sericum|src/ir/opcode.rs|387|as_mut_slice...
No, I'm fine with what we have now.
I have started working on this (see #55), but there's a strange problem with the threads test. It works with the feature enabled, but not without it, and I haven't...
If I remember correctly, I tried and failed to use `PartialEq` because of the coherence rules – I couldn't implement it for the floats because Rust cannot guarantee that those...
I think we should be able to create a more generic `Noned` trait that could have custom impls of `.is_none()` (for example matching all values above 9999.0), and then have...
I think that doing type inference will risk hurting locality of the code. With elision, the effect is quite limited, whereas with full inference, you can have spooky action at...