From a0e2f82b81ad65492540b14aefa01477bebf52a0 Mon Sep 17 00:00:00 2001 From: Alexander Tesfamichael Date: Thu, 8 Feb 2024 18:54:51 +0100 Subject: [PATCH] feat(beacon_api): prefer slice --- src/beacon_api.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/beacon_api.rs b/src/beacon_api.rs index 2ccabc7..48737c5 100644 --- a/src/beacon_api.rs +++ b/src/beacon_api.rs @@ -46,10 +46,10 @@ pub struct BeaconApi { } impl BeaconApi { - pub fn new(nodes: &Vec) -> Self { + pub fn new(nodes: &[Url]) -> Self { if !nodes.is_empty() { Self { - nodes: nodes.clone(), + nodes: nodes.to_vec(), client: reqwest::Client::new(), } } else {