Skip to content

Commit 87e090e

Browse files
committed
Address warning during bootstrap
1 parent 11a493e commit 87e090e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/elixir/lib/calendar/naive_datetime.ex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,17 +1073,6 @@ defmodule NaiveDateTime do
10731073
}
10741074
end
10751075

1076-
defp div_rem(int1, int2) do
1077-
div = div(int1, int2)
1078-
rem = int1 - div * int2
1079-
1080-
if rem >= 0 do
1081-
{div, rem}
1082-
else
1083-
{div - 1, rem + int2}
1084-
end
1085-
end
1086-
10871076
def from_gregorian_seconds(seconds, {microsecond, precision}, calendar)
10881077
when is_integer(seconds) do
10891078
iso_days = Calendar.ISO.gregorian_seconds_to_iso_days(seconds, microsecond)
@@ -1103,6 +1092,17 @@ defmodule NaiveDateTime do
11031092
}
11041093
end
11051094

1095+
defp div_rem(int1, int2) do
1096+
div = div(int1, int2)
1097+
rem = int1 - div * int2
1098+
1099+
if rem >= 0 do
1100+
{div, rem}
1101+
else
1102+
{div - 1, rem + int2}
1103+
end
1104+
end
1105+
11061106
@doc """
11071107
Converts a `NaiveDateTime` struct to a number of gregorian seconds and microseconds.
11081108

0 commit comments

Comments
 (0)