Skip to content

Commit

Permalink
Fix PdCString::from_str on unix
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenByteDev committed Aug 11, 2023
1 parent f7b0559 commit 2735baf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pdcstring/impl/other/pdcstring.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::pdcstring::{ContainsNul, PdCStringInner, PdChar, PdUChar};

impl PdCStringInner for CString {
fn from_str(s: impl AsRef<str>) -> Result<Self, ContainsNul> {
Self::from_vec(s.as_bytes().to_vec())
Self::from_vec(s.as_ref().as_bytes().to_vec())
}

fn from_os_str(s: impl AsRef<std::ffi::OsStr>) -> Result<Self, ContainsNul> {
Expand Down

0 comments on commit 2735baf

Please sign in to comment.