From ebd4722fe69c946ca345bd1554d4a23931bed7e0 Mon Sep 17 00:00:00 2001 From: Lars Andersen Date: Mon, 28 Jun 2021 22:16:55 +0200 Subject: [PATCH] Trival refactoring --- src/refactor_nrepl/core.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/refactor_nrepl/core.clj b/src/refactor_nrepl/core.clj index 37d604ec..ee8fc4db 100644 --- a/src/refactor_nrepl/core.clj +++ b/src/refactor_nrepl/core.clj @@ -25,7 +25,11 @@ (defn ns-from-string "Retrieve the symbol naming the ns from file-content." [file-content] - (second (parse/read-ns-decl (PushbackReader. (java.io.StringReader. file-content))))) + (-> file-content + java.io.StringReader. + PushbackReader. + parse/read-ns-decl + second)) (defn ns-name-from-readable "Call slurp on readable and extract the ns-name from the content."