#[allow(unused_imports)]
use anyhow::Context;
pub trait OsStrContext {
fn to_str_wc ( & self ) -> crate :: rewrite_output_type ! ( core :: option :: Option < & str > );
}
impl OsStrContext for std :: ffi :: OsStr {
fn to_str_wc ( & self ) -> crate :: rewrite_output_type ! ( core :: option :: Option < & str > ) {
std :: ffi :: OsStr :: to_str(self)
.with_context(|| crate::call_failed!(Some(self), "to_str"))
}
}
pub trait OsStringContext {
fn try_reserve_wc ( & mut self , additional : usize ) -> crate :: rewrite_output_type ! ( core :: result :: Result < ( ) , std :: collections :: TryReserveError > );
fn try_reserve_exact_wc ( & mut self , additional : usize ) -> crate :: rewrite_output_type ! ( core :: result :: Result < ( ) , std :: collections :: TryReserveError > );
}
impl OsStringContext for std :: ffi :: OsString {
fn try_reserve_wc ( & mut self , additional : usize ) -> crate :: rewrite_output_type ! ( core :: result :: Result < ( ) , std :: collections :: TryReserveError > ) {
std :: ffi :: OsString :: try_reserve(self, additional)
.with_context(|| crate::call_failed!(Some(self), "try_reserve", additional))
}
fn try_reserve_exact_wc ( & mut self , additional : usize ) -> crate :: rewrite_output_type ! ( core :: result :: Result < ( ) , std :: collections :: TryReserveError > ) {
std :: ffi :: OsString :: try_reserve_exact(self, additional)
.with_context(|| crate::call_failed!(Some(self), "try_reserve_exact", additional))
}
}