(&self)
| 112 | |
| 113 | impl OsStrExt for OsStr { |
| 114 | fn as_bytes(&self) -> &[u8] { |
| 115 | // WASI strings are guaranteed to be UTF-8 |
| 116 | self.to_str().expect("wasip2 strings are UTF-8").as_bytes() |
| 117 | } |
| 118 | |
| 119 | fn from_bytes(slice: &[u8]) -> &OsStr { |
| 120 | // WASI strings are guaranteed to be UTF-8 |
no test coverage detected