Skip to content

Commit bd803ea

Browse files
committed
Fix build
1 parent dc6b06f commit bd803ea

File tree

2 files changed

+13
-107
lines changed

2 files changed

+13
-107
lines changed

hook/Cargo.lock

Lines changed: 0 additions & 99 deletions
This file was deleted.

hook/src/lib.rs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,19 @@ impl<T> TArray<T> {
245245

246246
impl FString {
247247
fn to_os_string(&self) -> OsString {
248-
use std::os::windows::ffi::OsStringExt;
249-
let slice = self.as_slice();
250-
let len = slice
251-
.iter()
252-
.enumerate()
253-
.find_map(|(i, &b)| (b == 0).then_some(i))
254-
.unwrap_or(slice.len());
255-
std::ffi::OsString::from_wide(&slice[0..len])
248+
#[cfg(target_os = "windows")]
249+
{
250+
use std::os::windows::ffi::OsStringExt;
251+
let slice = self.as_slice();
252+
let len = slice
253+
.iter()
254+
.enumerate()
255+
.find_map(|(i, &b)| (b == 0).then_some(i))
256+
.unwrap_or(slice.len());
257+
std::ffi::OsString::from_wide(&slice[0..len])
258+
}
259+
#[cfg(not(target_os = "windows"))]
260+
unimplemented!()
256261
}
257262
}
258263

0 commit comments

Comments
 (0)