diff options
author | Linus Nordberg <linus@nordberg.se> | 2014-09-10 10:04:54 +0200 |
---|---|---|
committer | Linus Nordberg <linus@nordberg.se> | 2014-09-10 10:04:54 +0200 |
commit | 471c67946f7eebc6916eccd9fccdc0965e811e1c (patch) | |
tree | f97c00513a86c89b2946020e4cc5165696bbed59 /src/db.erl | |
parent | 7a9ce6cd6e57d371ce4a512f74f5ad6d70c556a1 (diff) |
Get rid of dialyzer warning.
Specify the match as a tuple rather than a record since dialyzer
correctly reports that #plop fields cannot be atoms.
The drawback is that the match needs updating when the definition of
#plop{} changes, including merely reordering of fields.
Diffstat (limited to 'src/db.erl')
-rw-r--r-- | src/db.erl | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -146,7 +146,7 @@ handle_call({get_by_index_sorted, {Start, End}}, _From, State) -> select_index(Start, End) -> F = fun() -> - MatchHead = #plop{index = '$1', mtl = '$2', _ = '_'}, + MatchHead = {plop, '$1', '_', '$2', '_'}, Guard = [{'>=', '$1', Start}, {'=<', '$1', End}], Result = ['$$'], mnesia:select(plop, [{MatchHead, Guard, Result}]) |