optional icon indicating copy to clipboard operation
optional copied to clipboard

A small crate to provide space-efficient Option<_> replacements

Results 12 optional issues
Sort by recently updated
recently updated
newest added

Rust has const generics now, so we may want to use them to make the `Noned` trait generic over the none value (although this will likely require a workaround for...

Hi there! I don't understand why there is the `OptEq` trait. Why can't this crate use `PartialEq`? I haven't found anything about this in the documentation.

- [ ] `as_ref(&self) -> Option` - [ ] `ok_or(self, E) -> Result` - [ ] `ok_or_else(self, FnOnce() -> E) -> Result` - [x] `and(self, Option) -> Option` - [x]...

It would be very convenient if one could write ```rust #[derive(Noned)] pub struct Type(u32); ``` and have it expand to ```rust pub struct Type(u32); impl Noned for Type { fn...

Can Optioned be used for raw pointers across FFI boundaries? I was thinking of something like this: ```diff diff --git a/src/lib.rs b/src/lib.rs index fed33fb..ed09e1e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@...

We can implement it as a feature first.

Coverage includes benchmarks, which are pretty thorough, but some more tests would be nice anyway.

Note that unsigned ints and floats need special None handling.

Current coherence rules forbid implementing a trait both trait-bound + specific, so I cannot have `Eq` for `Optioned`.

I really have to revisit the docs section of the rust book...