     update_in conn.private, &Map.put_new(&1, :phoenix_view, module)
   end
 
-  def put_new_view(_conn, _module) do
-    raise Plug.Conn.AlreadySentError
-  end
+  def put_new_view(%Plug.Conn{}, _module), do: raise AlreadySentError
 
   @doc """
   Retrieves the current view.

    if state in @unsent do
      do_put_layout(conn, layout)
    else
      raise Plug.Conn.AlreadySentError
    end
  end


    put_private(conn, :phoenix_layout_formats, formats)
  end

  def put_layout_formats(%Plug.Conn{}, _formats), do: raise AlreadySentError

  @doc """
  Retrieves current layout formats.
