Skip to content

Commit 0a1999a

Browse files
committed
Simplify os.fspath
1 parent bfc58f9 commit 0a1999a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

vm/src/stdlib/os.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,12 +1109,8 @@ fn os_chmod(
11091109
Ok(())
11101110
}
11111111

1112-
fn os_fspath(path: PyPathLike, vm: &VirtualMachine) -> PyResult {
1113-
Ok(output_by_mode(
1114-
path.path.to_str().unwrap().to_owned(),
1115-
path.mode,
1116-
vm,
1117-
))
1112+
fn os_fspath(path: PyPathLike, vm: &VirtualMachine) -> PyObjectRef {
1113+
output_by_mode(path.path.to_str().unwrap().to_owned(), path.mode, vm)
11181114
}
11191115

11201116
fn os_rename(src: PyPathLike, dst: PyPathLike, vm: &VirtualMachine) -> PyResult<()> {

0 commit comments

Comments
 (0)