From 5a809c7a8a7df99c8a4fe13d85c8a8decd25d95f Mon Sep 17 00:00:00 2001 From: preciz Date: Sat, 3 Aug 2024 23:22:37 +0200 Subject: [PATCH 1/2] Fix typos --- lib/finch/http1/pool_metrics.ex | 2 +- lib/finch/http2/pool.ex | 2 +- test/support/finch_case.ex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/finch/http1/pool_metrics.ex b/lib/finch/http1/pool_metrics.ex index fb7d552f..3fb44c4c 100644 --- a/lib/finch/http1/pool_metrics.ex +++ b/lib/finch/http1/pool_metrics.ex @@ -6,7 +6,7 @@ defmodule Finch.HTTP1.PoolMetrics do * `:pool_index` - Index of the pool * `:pool_size` - Total number of connections of the pool - * `:available_connections` - Number of avaialable connections + * `:available_connections` - Number of available connections * `:in_use_connections` - Number of connections currently in use Caveats: diff --git a/lib/finch/http2/pool.ex b/lib/finch/http2/pool.ex index 604a01d4..ae026712 100644 --- a/lib/finch/http2/pool.ex +++ b/lib/finch/http2/pool.ex @@ -450,7 +450,7 @@ defmodule Finch.HTTP2.Pool do {:keep_state, data} end - # If we're in a read only state than respond with an error immediately + # If we're in a read only state then respond with an error immediately def connected_read_only({:call, from}, {:request, _, _, _}, _) do {:keep_state_and_data, {:reply, from, {:error, Error.exception(:read_only)}}} end diff --git a/test/support/finch_case.ex b/test/support/finch_case.ex index d6ba2be6..380ec3e3 100644 --- a/test/support/finch_case.ex +++ b/test/support/finch_case.ex @@ -18,6 +18,6 @@ defmodule FinchCase do {:ok, bypass ++ [finch_name: context.test]} end - @doc "Returns the url for a Bypass instance" + @doc "Returns the URL for a Bypass instance" def endpoint(%{port: port}, path \\ "/"), do: "http://localhost:#{port}#{path}" end From e47202c206289c2a47d7d35c25369e3357370ecc Mon Sep 17 00:00:00 2001 From: preciz Date: Sat, 3 Aug 2024 23:29:21 +0200 Subject: [PATCH 2/2] Improve language --- lib/finch/pool_manager.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/finch/pool_manager.ex b/lib/finch/pool_manager.ex index a59f00ca..8ed29a94 100644 --- a/lib/finch/pool_manager.ex +++ b/lib/finch/pool_manager.ex @@ -122,7 +122,7 @@ defmodule Finch.PoolManager do defp maybe_drop_tls_options(config, _), do: config - # Hostname is required when the address is not a url (binary) so we need to specify + # Hostname is required when the address is not a URL (binary) so we need to specify # a default value in case the configuration does not specify one. defp maybe_add_hostname(config, {_scheme, {:local, _path}, _port} = _shp) when is_map(config) do conn_opts =