fix: Add missing clap::builder::OsStr impl

Found via rust-lang/cargo#10554
This commit is contained in:
Ed Page 2024-02-10 19:59:40 -06:00
parent 9295e322e8
commit 323345b3bc

View file

@ -64,16 +64,6 @@ impl From<Str> for OsStr {
}
}
#[cfg(feature = "perf")]
impl From<&'_ Str> for OsStr {
fn from(id: &'_ Str) -> Self {
match id.clone().into_inner() {
crate::builder::StrInner::Static(s) => Self::from_static_ref(std::ffi::OsStr::new(s)),
crate::builder::StrInner::Owned(s) => Self::from_ref(std::ffi::OsStr::new(s.as_ref())),
}
}
}
impl From<&'_ Str> for OsStr {
fn from(id: &'_ Str) -> Self {
id.clone().into()