mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 09:28:21 +00:00
9 lines
249 B
Rust
9 lines
249 B
Rust
/// uses unsafe to postfix the string with invalid utf8 data
|
|
#[allow(invalid_from_utf8_unchecked)]
|
|
pub fn invalid_utf8(prefix: &str) -> String {
|
|
let bytes = b"\xc3\x73";
|
|
|
|
unsafe {
|
|
format!("{prefix}{}", std::str::from_utf8_unchecked(bytes))
|
|
}
|
|
}
|