You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in rust_icu, APIs that take read-only UTF-16 arguments take &UChar. This means that if the caller has UTF-16 in a different container, the user needs to do something to materialize a UChar container instead. Yet, the underlying C API might be taking UTF-16 by pointer and length.
On the other hand, when the output of an API is UChar, there doesn't appear to be a ready-made way to read its contents as &[u16].
I suggest 1) making UChar deref into &[u16] and 2) making APIs that take read-only UTF-16 arguments take &[u16] (which UChar can then deref to).
The text was updated successfully, but these errors were encountered:
Currently in
rust_icu
, APIs that take read-only UTF-16 arguments take&UChar
. This means that if the caller has UTF-16 in a different container, the user needs to do something to materialize aUChar
container instead. Yet, the underlying C API might be taking UTF-16 by pointer and length.On the other hand, when the output of an API is
UChar
, there doesn't appear to be a ready-made way to read its contents as&[u16]
.I suggest 1) making
UChar
deref into&[u16]
and 2) making APIs that take read-only UTF-16 arguments take&[u16]
(whichUChar
can then deref to).The text was updated successfully, but these errors were encountered: