Skip to content

Commit 43e2504

Browse files
committed
Simplify os.fspath
1 parent 5e52c71 commit 43e2504

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
@@ -1131,12 +1131,8 @@ fn os_chmod(
11311131
Ok(())
11321132
}
11331133

1134-
fn os_fspath(path: PyPathLike, vm: &VirtualMachine) -> PyResult {
1135-
Ok(output_by_mode(
1136-
path.path.to_str().unwrap().to_owned(),
1137-
path.mode,
1138-
vm,
1139-
))
1134+
fn os_fspath(path: PyPathLike, vm: &VirtualMachine) -> PyObjectRef {
1135+
output_by_mode(path.path.to_str().unwrap().to_owned(), path.mode, vm)
11401136
}
11411137

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

0 commit comments

Comments
 (0)