This hunk would probably be cleaner if you hoisted the {noreply, State} into both pattern clauses.