From 1c5b01975c55da2df58136bee2c3abfde0085127 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Sun, 27 Feb 2022 17:57:34 +0000 Subject: [PATCH] fix unused symbol on windows --- lib/src/string.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/string.rs b/lib/src/string.rs index 2791aadcc..c6f1c3ce4 100644 --- a/lib/src/string.rs +++ b/lib/src/string.rs @@ -1,6 +1,6 @@ use crate::traits::*; use crate::util::{string_into_raw_parts, vec_into_raw_parts}; -use std::ffi::{CStr, CString, OsStr, OsString}; +use std::ffi::{CStr, CString, OsString}; use std::os::raw::c_char; use std::path::PathBuf; @@ -298,6 +298,7 @@ impl<'a> RustString<'a> { // on UNIX, we can use the bytes directly, without requiring that they // be valid UTF-8. use std::os::unix::ffi::OsStrExt; + use std::ffi::OsStr; OsStr::from_bytes(self.as_bytes()).to_os_string() }; #[cfg(windows)]