MCPcopy Index your code
hub / github.com/encounter/objdiff / process_utf16

Function process_utf16

objdiff-gui/src/views/config.rs:130–136  ·  view source on GitHub ↗
(bytes: &[u8])

Source from the content-addressed store, hash-verified

128
129#[cfg(all(windows, feature = "wsl"))]
130fn process_utf16(bytes: &[u8]) -> Result<String, FromUtf16Error> {
131 let u16_bytes: Vec<u16> = bytes
132 .chunks_exact(2)
133 .filter_map(|c| Some(u16::from_ne_bytes(c.try_into().ok()?)))
134 .collect();
135 String::from_utf16(&u16_bytes)
136}
137
138#[cfg(all(windows, feature = "wsl"))]
139fn wsl_cmd(args: &[&str]) -> Result<String> {

Callers 1

wsl_cmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected