Simplify os.fspath

This commit is contained in:
Aviv Palivoda
2020-04-09 11:07:11 +03:00
parent 5e52c7174e
commit 43e2504233

View File

@@ -1131,12 +1131,8 @@ fn os_chmod(
Ok(())
}
fn os_fspath(path: PyPathLike, vm: &VirtualMachine) -> PyResult {
Ok(output_by_mode(
path.path.to_str().unwrap().to_owned(),
path.mode,
vm,
))
fn os_fspath(path: PyPathLike, vm: &VirtualMachine) -> PyObjectRef {
output_by_mode(path.path.to_str().unwrap().to_owned(), path.mode, vm)
}
fn os_rename(src: PyPathLike, dst: PyPathLike, vm: &VirtualMachine) -> PyResult<()> {