From 9930ef7f17e91a383f784acbcea8444936d2a9ea Mon Sep 17 00:00:00 2001 From: Gal Schlezinger Date: Tue, 12 Nov 2024 13:29:29 +0200 Subject: [PATCH] remove unnecessary .to_string() --- src/remote_node_index.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/remote_node_index.rs b/src/remote_node_index.rs index 144665d0a..1b343883c 100644 --- a/src/remote_node_index.rs +++ b/src/remote_node_index.rs @@ -82,8 +82,7 @@ pub enum Error { /// use crate::remote_node_index::list; /// ``` pub fn list(base_url: &Url) -> Result, Error> { - let base_url = base_url.to_string(); - let base_url = base_url.trim_end_matches('/'); + let base_url = base_url.as_str().trim_end_matches('/'); let index_json_url = format!("{base_url}/index.json"); let resp = crate::http::get(&index_json_url) .map_err(crate::http::Error::from)?