Improve code readability

Cleaning up unused imports + changing order of operations on a value that is 0 by default
pull/17/head
Bram 2024-03-29 10:51:10 +01:00
parent ed78695213
commit 33d98dd6ff
3 changed files with 2 additions and 7 deletions

View File

@ -43,8 +43,6 @@ do not need to generate identifiers yourself.
import FastDict as Dict exposing (Dict) import FastDict as Dict exposing (Dict)
import Internal.Config.Text as Text import Internal.Config.Text as Text
import Internal.Tools.Json as Json import Internal.Tools.Json as Json
import Json.Decode as D
import Json.Encode as E
{-| The Iddict data type. {-| The Iddict data type.
@ -66,8 +64,8 @@ coder x =
{ cursor = { cursor =
Dict.keys d Dict.keys d
|> List.maximum |> List.maximum
|> Maybe.withDefault -1 |> Maybe.map ((+) 1)
|> (+) 1 |> Maybe.withDefault 0
|> max (Dict.size d) |> max (Dict.size d)
|> max c |> max c
, dict = d , dict = d

View File

@ -72,8 +72,6 @@ import Internal.Tools.Hashdict as Hashdict exposing (Hashdict)
import Internal.Tools.Iddict as Iddict exposing (Iddict) import Internal.Tools.Iddict as Iddict exposing (Iddict)
import Internal.Tools.Json as Json import Internal.Tools.Json as Json
import Internal.Config.Text as Text import Internal.Config.Text as Text
import Json.Decode as D
import Json.Encode as E
import Recursion import Recursion
import Recursion.Traverse import Recursion.Traverse
import Set exposing (Set) import Set exposing (Set)

View File

@ -5,7 +5,6 @@ import Fuzz exposing (Fuzzer)
import Internal.Filter.Timeline as Filter exposing (Filter) import Internal.Filter.Timeline as Filter exposing (Filter)
import Internal.Values.Timeline as Timeline exposing (Batch, Timeline) import Internal.Values.Timeline as Timeline exposing (Batch, Timeline)
import Json.Decode as D import Json.Decode as D
import Json.Encode as E
import Test exposing (..) import Test exposing (..)
import Test.Filter.Timeline as TestFilter import Test.Filter.Timeline as TestFilter
import Internal.Tools.Json as Json import Internal.Tools.Json as Json