@@ -97,7 +97,7 @@ impl TrinoQueryApiResponse {
9797 skip( self ) ,
9898 fields( trino_lb_addr = %trino_lb_addr) ,
9999 ) ]
100- pub fn change_next_uri_to_trino_lb ( & mut self , trino_lb_addr : & Url ) -> Result < ( ) , Error > {
100+ pub fn change_next_uri_to_trino_lb ( & mut self , trino_lb_addr : Url ) -> Result < ( ) , Error > {
101101 if let Some ( next_uri) = & self . next_uri {
102102 self . next_uri = Some ( change_next_uri_to_trino_lb ( next_uri, trino_lb_addr) ) ;
103103 }
@@ -185,7 +185,7 @@ impl TrinoQueryApiResponse {
185185 ) ]
186186 pub fn update_trino_references (
187187 & mut self ,
188- trino_lb_addr : & Url ,
188+ trino_lb_addr : Url ,
189189 external_trino_addr : Option < & Url > ,
190190 ) -> Result < ( ) , Error > {
191191 // Point nextUri to trino-lb
@@ -207,8 +207,8 @@ impl TrinoQueryApiResponse {
207207#[ instrument(
208208 fields( next_uri = %next_uri, trino_lb_addr = %trino_lb_addr) ,
209209) ]
210- fn change_next_uri_to_trino_lb ( next_uri : & Url , trino_lb_addr : & Url ) -> Url {
211- let mut result = trino_lb_addr. clone ( ) ;
210+ fn change_next_uri_to_trino_lb ( next_uri : & Url , trino_lb_addr : Url ) -> Url {
211+ let mut result = trino_lb_addr;
212212 result. set_path ( next_uri. path ( ) ) ;
213213 result
214214}
@@ -275,7 +275,7 @@ mod tests {
275275 ) {
276276 let next_uri = Url :: parse ( & next_uri) . unwrap ( ) ;
277277 let trino_lb_addr = Url :: parse ( & trino_lb_addr) . unwrap ( ) ;
278- let result = change_next_uri_to_trino_lb ( & next_uri, & trino_lb_addr) ;
278+ let result = change_next_uri_to_trino_lb ( & next_uri, trino_lb_addr) ;
279279 assert_eq ! ( result. to_string( ) , expected) ;
280280 }
281281
0 commit comments