usecrate::old::snapshot_0::wasi::WasiResult;usestd::str;/// Creates not-owned WASI path from byte slice.
////// NB WASI spec requires bytes to be valid UTF-8. Otherwise,
/// `__WASI_ERRNO_ILSEQ` error is returned.
pub(crate)fnpath_from_slice<'a>(s:&'a [u8])->WasiResult<&'astr>{let s =str::from_utf8(s)?;Ok(s)}