We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 85f3888 commit 8626154Copy full SHA for 8626154
1 file changed
src/path/arg.rs
@@ -513,12 +513,12 @@ impl Arg for &CStr {
513
impl Arg for &CString {
514
#[inline]
515
fn as_str(&self) -> io::Result<&str> {
516
- unimplemented!()
+ self.to_str().map_err(|_utf8_err| io::Errno::INVAL)
517
}
518
519
520
fn to_string_lossy(&self) -> Cow<'_, str> {
521
+ CStr::to_string_lossy(self)
522
523
524
0 commit comments