This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch nouveau-improvements
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit efb24a3a3f9713bbde31647907b716c4721095f8
Author: Robert Newson <rnew...@apache.org>
AuthorDate: Fri Aug 8 16:24:58 2025 +0100

    gun takes iodata so no need for io_lib or flatten
---
 src/nouveau/src/nouveau_api.erl | 37 ++++++++++---------------------------
 1 file changed, 10 insertions(+), 27 deletions(-)

diff --git a/src/nouveau/src/nouveau_api.erl b/src/nouveau/src/nouveau_api.erl
index 64f5a948a..319170a4c 100644
--- a/src/nouveau/src/nouveau_api.erl
+++ b/src/nouveau/src/nouveau_api.erl
@@ -217,37 +217,20 @@ set_seq(#index{} = Index, ReqBody) ->
 %% private functions
 
 index_path(Path) when is_binary(Path) ->
-    lists:flatten(
-        io_lib:format(
-            "/index/~s",
-            [
-                couch_util:url_encode(Path)
-            ]
-        )
-    );
+    [<<"/index/">>, couch_util:url_encode(Path)];
 index_path(#index{} = Index) ->
-    lists:flatten(
-        io_lib:format(
-            "/index/~s",
-            [
-                couch_util:url_encode(nouveau_util:index_name(Index))
-            ]
-        )
-    ).
+    [<<"/index/">>, couch_util:url_encode(nouveau_util:index_name(Index))].
 
 doc_path(#index{} = Index, DocId) ->
-    lists:flatten(
-        io_lib:format(
-            "/index/~s/doc/~s",
-            [
-                couch_util:url_encode(nouveau_util:index_name(Index)),
-                couch_util:url_encode(DocId)
-            ]
-        )
-    ).
+    [
+        <<"/index/">>,
+        couch_util:url_encode(nouveau_util:index_name(Index)),
+        <<"/doc/">>,
+        couch_util:url_encode(DocId)
+    ].
 
-search_path(IndexName) ->
-    index_path(IndexName) ++ "/search".
+search_path(#index{} = Index) ->
+    [<<"/index/">>, couch_util:url_encode(nouveau_util:index_name(Index)), 
<<"/search">>].
 
 jaxrs_error(400, Body) ->
     {bad_request, message(Body)};

Reply via email to