Skip to content

Commit 6b0f805

Browse files
committed
use ? instead of try
1 parent 8e30032 commit 6b0f805

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

platform/Path.roc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,7 @@ read_utf8! : Path => Result Str [FileReadErr Path IOErr, FileReadUtf8Err Path _]
307307
read_utf8! = |path|
308308
bytes =
309309
Host.file_read_bytes!(InternalPath.to_bytes(path))
310-
|> Result.map_err(|read_err| FileReadErr(path, InternalIOErr.handle_err(read_err)))
311-
|> try
310+
|> Result.map_err(|read_err| FileReadErr(path, InternalIOErr.handle_err(read_err)))?
312311

313312
Str.from_utf8(bytes)
314313
|> Result.map_err(|err| FileReadUtf8Err(path, err))

0 commit comments

Comments
 (0)