I'm ok with adding refactoring all three, or simply making a function to call for the same effect. Cleaning up debt is always good.

Sean Cribbs

On Apr 1, 2013, at 4:29 PM, Evan Vigil-McClanahan <notifications@github.com> wrote:

> In src/riak_kv_wm_object.erl:
> 
> >  ensure_doc(Ctx) -> Ctx.
> >  
> >  %% @spec delete_resource(reqdata(), context()) -> {true, reqdata(), context()}
> >  %% @doc Delete the document specified.
> >  delete_resource(RD, Ctx=#ctx{bucket=B, key=K, client=C, rw=RW, r=R, w=W,
> > -        pr=PR, pw=PW, dw=DW, timeout=Timeout}) ->
> > -    Options = lists:filter(fun({_, default}) -> false; (_) -> true end,
> > -        [{rw, RW}, {r, R}, {w, W}, {pr, PR}, {pw, PW}, {dw, DW}, 
> > -         {timeout, Timeout}]),
> > +        pr=PR, pw=PW, dw=DW}) ->
> > +    Options0 = lists:filter(fun({_, default}) -> false; (_) -> true end,
> it's done in three different ways in three different places. Would be happy to refactor it to be uniform, but wasn't sure that this PR was the right place.
> 
> —
> Reply to this email directly or view it on GitHub.