Skip to content

Commit 7d9a815

Browse files
committed
rename sub to subMsg, because can be mistaken with subscription
1 parent 8e90c30 commit 7d9a815

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/Main.elm

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ update msg model =
4444
NoOp ->
4545
model
4646

47-
Pair1 sub ->
47+
Pair1 subMsg ->
4848
let
4949
pair1 =
50-
Pair.update sub model.pair1
50+
Pair.update subMsg model.pair1
5151

5252
totals =
5353
Totals.update (Totals.UpdateRed <| Pair.getRedNum pair1) model.totals
@@ -57,10 +57,10 @@ update msg model =
5757
in
5858
{ model | pair1 = pair1, pair2 = pair2, totals = totals }
5959

60-
Pair2 sub ->
60+
Pair2 subMsg ->
6161
let
6262
pair2 =
63-
Pair.update sub model.pair2
63+
Pair.update subMsg model.pair2
6464

6565
totals =
6666
Totals.update (Totals.UpdateRed <| Pair.getRedNum pair2) model.totals

src/Pair.elm

+4-4
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ type Msg
4141
update : Msg -> Model -> Model
4242
update msg model =
4343
case msg of
44-
PairGreen sub ->
45-
{ model | greenCounter = Counter.update sub model.greenCounter, totalClickCount = model.totalClickCount + 1 }
44+
PairGreen subMsg ->
45+
{ model | greenCounter = Counter.update subMsg model.greenCounter, totalClickCount = model.totalClickCount + 1 }
4646

47-
PairRed sub ->
48-
{ model | redCounter = Counter.update sub model.redCounter, totalClickCount = model.totalClickCount + 1 }
47+
PairRed subMsg ->
48+
{ model | redCounter = Counter.update subMsg model.redCounter, totalClickCount = model.totalClickCount + 1 }
4949

5050
UpdateRed value ->
5151
{ model | redCounter = Counter.update (Counter.SetNum value) model.redCounter }

0 commit comments

Comments
 (0)