diff options
author | Kostis Sagonas <[email protected]> | 2013-02-19 11:16:30 +0100 |
---|---|---|
committer | Kostis Sagonas <[email protected]> | 2013-02-19 11:16:30 +0100 |
commit | e5be124734e45633df4d0dd040c683551f6ef365 (patch) | |
tree | d38de867d6ca0bb82e29a79a914e7666c4f5918b | |
parent | 23c9b7f04b85b7d25e31aa26ac559cbf8ef4a73e (diff) | |
download | otp-e5be124734e45633df4d0dd040c683551f6ef365.tar.gz otp-e5be124734e45633df4d0dd040c683551f6ef365.tar.bz2 otp-e5be124734e45633df4d0dd040c683551f6ef365.zip |
Simplify a case construct using inequality
-rw-r--r-- | lib/dialyzer/src/dialyzer_codeserver.erl | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/dialyzer/src/dialyzer_codeserver.erl b/lib/dialyzer/src/dialyzer_codeserver.erl index 9989118671..5109bf968a 100644 --- a/lib/dialyzer/src/dialyzer_codeserver.erl +++ b/lib/dialyzer/src/dialyzer_codeserver.erl @@ -100,10 +100,7 @@ ets_dict_to_dict(Table) -> ets:foldl(Fold, dict:new(), Table). ets_set_is_element(Key, Table) -> - case ets:lookup(Table, Key) of - [] -> false; - _ -> true - end. + ets:lookup(Table, Key) =/= []. ets_set_insert_set(Set, Table) -> ets_set_insert_list(sets:to_list(Set), Table). @@ -116,7 +113,7 @@ ets_set_to_set(Table) -> ets:foldl(Fold, sets:new(), Table). ets_read_concurrent_table(Name) -> - ets:new(Name,[{read_concurrency, true}]). + ets:new(Name, [{read_concurrency, true}]). %%-------------------------------------------------------------------- |