Robert Bastian

Results 390 comments of Robert Bastian

We could for example make the assumption that our strings will at most be half a usize long.

`tests/transliterate/data/baked` contains some hand written tests, it does not contain CLDR data.

> -u-ca-islamic corresponds to AnyCalendarKind::IslamicObservational We should document this better. There are 5 islamic calendars in CLDR: https://github.com/unicode-org/cldr/blob/main/common/bcp47/calendar.xml#L22-L26. The names don't match up directly, which one is missing?

> I think I prefer foo.iter().map(...).collect() because directly using from_iter doesn't chain, I didn't touch `collect`s without a turbofish. This often reduces line breaking, many expressions become one-liners.

> It seems self-inconsistent that you're changing code to use turbofish in .parse::() but not .collect::() I would love to change code to `Foo::from_str`, but that's not in the prelude,...

I'm not a fan of the turbofish if it can be avoided, I prefer using a constructor-like method (like `Foo::from_string` over `.parse::()`). One issue with collections is that you have...

I think `FromStr::from_str` should dictate naming. It is not an ideal name, but it's the name Rust uses, and we should follow convention. I like the `TinyAsciiStr` model: it has...

> > (const) fn from_str(&str) -> Self > This is problematic because the signature is different than the trait function FromStr::from_str. I think if a function shadows, it should have...

Actually I'm wholly against `FromStr` for infallible. `from_str` should be an inherent method, and it should not implement the trait method because the signature is different than the inherent function,...