input.rs
input.rs copied to clipboard
Panic when reading invalid UTF-8 strings in the device name
I got a SL600 microphone that seems to be manufactured by ISK. Its manufacturer field is padded with 0xFF which generates invalid UTF-8 strings.
Possible replacements for the assertions (expect("Device name is no valid utf8")) are:
- returning a
CStrorOsStr -
to_string_lossy(), but this will allocate aString
What would be your (owners) approach to do that? I may be volunteer to do the PR.
This causes https://github.com/pop-os/cosmic-comp/issues/1906