   ## get_until
 
   defp get_until(encoding, prompt, mod, fun, args,
-                 state(input: input, output: output, capture_prompt: capture_prompt) = s) do
+                 %{input: input, output: output, capture_prompt: capture_prompt} = s) do
     case :unicode.characters_to_list(input, encoding) do
       {:error, _, _} ->
         {:error, s}

  ## get_line

  defp get_line(encoding, prompt,
                state(input: input, output: output, capture_prompt: capture_prompt) = s) do
    case :unicode.characters_to_list(input, encoding) do
      {:error, _, _} ->
        {{:error, :collect_line}, s}

    s
  end

  defp io_request({:put_chars, chars}, %{output: output} = s) do
    {:ok, %{s | output: << output :: binary, String.from_char_data!(chars) :: binary >>}}
  end

  defp io_request({:put_chars, m, f, as}, %{output: output} = s) do
    chars = apply(m, f, as)
    {:ok, %{s| output: << output :: binary, String.from_char_data!(chars) :: binary >>}}
  end

  defp io_request({:put_chars, _encoding, chars}, s) do
