(self, path: impl Into<PathBuf>, vm: &VirtualMachine)
| 196 | |
| 197 | impl OutputMode { |
| 198 | pub(super) fn process_path(self, path: impl Into<PathBuf>, vm: &VirtualMachine) -> PyObjectRef { |
| 199 | fn inner(mode: OutputMode, path: PathBuf, vm: &VirtualMachine) -> PyObjectRef { |
| 200 | match mode { |
| 201 | OutputMode::String => vm.fsdecode(path).into(), |
| 202 | OutputMode::Bytes => vm |
| 203 | .ctx |
| 204 | .new_bytes(path.into_os_string().into_encoded_bytes()) |
| 205 | .into(), |
| 206 | } |
| 207 | } |
| 208 | inner(self, path.into(), vm) |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | impl OsPath { |
no test coverage detected