diff options
author | Loïc Hoguin <[email protected]> | 2012-12-22 16:37:11 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2012-12-22 16:37:11 +0100 |
commit | cc65a723d70bb078b048bab81eeb8a4bd7ed39ce (patch) | |
tree | ec26323b67116f047fa22b7a2f8b5fdc365c98ea /src | |
parent | a07d063fd8fc8a1cfadcb35cc89e190695773fe8 (diff) | |
download | cowboy-cc65a723d70bb078b048bab81eeb8a4bd7ed39ce.tar.gz cowboy-cc65a723d70bb078b048bab81eeb8a4bd7ed39ce.tar.bz2 cowboy-cc65a723d70bb078b048bab81eeb8a4bd7ed39ce.zip |
Use lists:keyreplace/4 instead of lists:keydelete/3 + cons
Diffstat (limited to 'src')
-rw-r--r-- | src/cowboy_req.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl index b29d694..8525247 100644 --- a/src/cowboy_req.erl +++ b/src/cowboy_req.erl @@ -537,7 +537,7 @@ meta(Name, Req, Default) -> %% If the value already exists it will be overwritten. -spec set_meta(atom(), any(), Req) -> Req when Req::req(). set_meta(Name, Value, Req=#http_req{meta=Meta}) -> - Req#http_req{meta=[{Name, Value}|lists:keydelete(Name, 1, Meta)]}. + Req#http_req{meta=lists:keyreplace(Name, 1, Meta, {Name, Value})}. %% Request Body API. |