From ae3985de4669cb37259ca76729e5928098cf1f38 Mon Sep 17 00:00:00 2001 From: Cyril Plisko Date: Mon, 4 Dec 2017 17:52:09 -0500 Subject: [PATCH] clippy: using '.clone()' on a ref-counted pointer --- examples/pubsub.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pubsub.rs b/examples/pubsub.rs index aa23a4e..be438b0 100644 --- a/examples/pubsub.rs +++ b/examples/pubsub.rs @@ -100,7 +100,7 @@ impl publisher::FutureService for Publisher { type SubscribeFut = Box>; fn subscribe(&self, id: u32, address: SocketAddr) -> Self::SubscribeFut { - let clients = self.clients.clone(); + let clients = Rc::clone(&self.clients); Box::new( subscriber::FutureClient::connect(address, client::Options::default()) .map(move |subscriber| {