Skip to content

Commit 115e022

Browse files
author
Yuki Ito
committed
Remove unneeded case
`:os.type/0` always returns a tuple in R16B
1 parent dc5fe48 commit 115e022

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/elixir/lib/path.ex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,7 @@ defmodule Path do
385385
join(left, atom_to_binary(right))
386386

387387
defp major_os_type do
388-
case :os.type do
389-
{ maj, _ } -> maj
390-
maj -> maj
391-
end
388+
:os.type |> elem(0)
392389
end
393390

394391
defp do_join(<<uc_letter, ?:, rest :: binary>>, relativename, [], :win32) when uc_letter in ?A..?Z, do:

0 commit comments

Comments
 (0)