From d952cd385e79b10e0a5cdd5b205e39d2ddfc9101 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Wed, 24 Sep 2025 12:26:53 -0700 Subject: [PATCH] fix: implement unimplemented &CString Arg functions --- src/path/arg.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/path/arg.rs b/src/path/arg.rs index 9edeb57ff..a09958ee5 100644 --- a/src/path/arg.rs +++ b/src/path/arg.rs @@ -513,12 +513,12 @@ impl Arg for &CStr { impl Arg for &CString { #[inline] fn as_str(&self) -> io::Result<&str> { - unimplemented!() + self.to_str().map_err(|_utf8_err| io::Errno::INVAL) } #[inline] fn to_string_lossy(&self) -> Cow<'_, str> { - unimplemented!() + CStr::to_string_lossy(self) } #[inline]