Robert Bastian

Results 70 comments of Robert Bastian

Isn't https://github.com/unicode-org/icu4x/issues/2182 much wider in scope, i.e. proper C++ namespacing? I'm thinking of removing the prefix from all names, and just slapping it on every name that is generated for...

There are also fallible functions that don't have a `try_` prefix, like `str::from_utf8`, which I think is fairly similar to `from_bytes` functions.

I think the `try` prefix is only worth the extra typing if there's also an unprefixed fuction. So if we had `from_bytes` which panics, `try_from_bytes` would be the safe version...

Note that the all-1 bit-pattern is actually not the maximum value for signed integers.

Raw ULE types don't show up in ZeroVec bounds though. Do you mean a newtype `NichedOption` and its associated ULE type `NichedOptionULE`? I don't think that "migrating ICU4X users over...

So something like ```rust /// N == core::mem::sizeo_of::() pub trait NicheBytes: ULE { const INVALID_BIT_PATTERN: [u8; N]; } pub struct NichedOption(Option); impl Deref for NichedOption { type Target = Option;...

The union cannot be defined without `N`, as `::INVALID_BIT_PATTERN.len()` is not evaluable.

I also think it's a nice hint to the implementor.

There are a few instances across those two crates, they should all be updated. I don't think benchmarks are necessary.

I'm pretty sure there were more than 2 instances